1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Merge pull request #3 from Fede85/master

Merged Federico's pulll request, "ultimate refinements to the examples"
This commit is contained in:
tigoe
2012-04-12 12:08:09 -07:00
12 changed files with 21 additions and 16 deletions

View File

@ -50,9 +50,7 @@ int x = 5;
int y = 5; int y = 5;
void setup() { void setup() {
Serial.begin(9600); // initialize the I/O pins as outputs
// initialize the I/O pins as outputs:
// iterate over the pins: // iterate over the pins:
for (int thisPin = 0; thisPin < 8; thisPin++) { for (int thisPin = 0; thisPin < 8; thisPin++) {
// initialize the output pins: // initialize the output pins:

View File

@ -14,7 +14,11 @@ byte value;
void setup() void setup()
{ {
// initialize serial and wait for port to open:
Serial.begin(9600); Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
} }
void loop() void loop()

View File

@ -32,7 +32,8 @@
This example code is in the public domain. This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal http://arduino.cc/en/Tutorial/LiquidCrystalAutoscroll
*/ */
// include the library code: // include the library code:

View File

@ -32,7 +32,7 @@
This example code is in the public domain. This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal http://arduino.cc/en/Tutorial/LiquidCrystalBlink
*/ */

View File

@ -33,7 +33,8 @@
This example code is in the public domain. This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal http://arduino.cc/en/Tutorial/LiquidCrystalCursor
*/ */
// include the library code: // include the library code:

View File

@ -33,7 +33,8 @@
This example code is in the public domain. This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal http://arduino.cc/en/Tutorial/LiquidCrystalDisplay
*/ */
// include the library code: // include the library code:

View File

@ -33,7 +33,8 @@
This example code is in the public domain. This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal http://arduino.cc/en/Tutorial/LiquidCrystalScroll
*/ */
// include the library code: // include the library code:

View File

@ -32,7 +32,7 @@
This example code is in the public domain. This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal http://arduino.cc/en/Tutorial/LiquidCrystalSerial
*/ */
// include the library code: // include the library code:

View File

@ -32,7 +32,7 @@
This example code is in the public domain. This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal http://arduino.cc/en/Tutorial/LiquidCrystalTextDirection
*/ */
@ -49,7 +49,6 @@ void setup() {
lcd.begin(16, 2); lcd.begin(16, 2);
// turn on the cursor: // turn on the cursor:
lcd.cursor(); lcd.cursor();
Serial.begin(9600);
} }
void loop() { void loop() {

View File

@ -32,7 +32,8 @@
This example code is in the public domain. This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal http://arduino.cc/en/Tutorial/LiquidCrystalSetCursor
*/ */
// include the library code: // include the library code:

View File

@ -23,7 +23,7 @@ SoftwareSerial mySerial(2, 3); // RX, TX
void setup() void setup()
{ {
// Open serial communications and wait for port to open: // Open serial communications and wait for port to open:
Serial.begin57600; Serial.begin(57600);
while (!Serial) { while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only ; // wait for serial port to connect. Needed for Leonardo only
} }

View File

@ -29,8 +29,7 @@ Stepper myStepper(stepsPerRevolution, 8,9,10,11);
int stepCount = 0; // number of steps the motor has taken int stepCount = 0; // number of steps the motor has taken
void setup() { void setup() {
// initialize the serial port: // nothing to do inside the setup
Serial.begin(9600);
} }
void loop() { void loop() {