Skip to content

Commit 79ffd2b

Browse files
committed
Merge pull request arduino#3 from Fede85/master
Merged Federico's pulll request, "ultimate refinements to the examples"
2 parents 0c6e76e + 89e9313 commit 79ffd2b

File tree

12 files changed

+21
-16
lines changed

12 files changed

+21
-16
lines changed

Diff for: build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ int x = 5;
5050
int y = 5;
5151

5252
void setup() {
53-
Serial.begin(9600);
54-
// initialize the I/O pins as outputs:
55-
53+
// initialize the I/O pins as outputs
5654
// iterate over the pins:
5755
for (int thisPin = 0; thisPin < 8; thisPin++) {
5856
// initialize the output pins:

Diff for: libraries/EEPROM/examples/eeprom_read/eeprom_read.ino

+4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ byte value;
1414

1515
void setup()
1616
{
17+
// initialize serial and wait for port to open:
1718
Serial.begin(9600);
19+
while (!Serial) {
20+
; // wait for serial port to connect. Needed for Leonardo only
21+
}
1822
}
1923

2024
void loop()

Diff for: libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.ino

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
3333
This example code is in the public domain.
3434
35-
http://www.arduino.cc/en/Tutorial/LiquidCrystal
35+
http://arduino.cc/en/Tutorial/LiquidCrystalAutoscroll
36+
3637
*/
3738

3839
// include the library code:

Diff for: libraries/LiquidCrystal/examples/Blink/Blink.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
3333
This example code is in the public domain.
3434
35-
http://www.arduino.cc/en/Tutorial/LiquidCrystal
35+
http://arduino.cc/en/Tutorial/LiquidCrystalBlink
3636
3737
*/
3838

Diff for: libraries/LiquidCrystal/examples/Cursor/Cursor.ino

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
3434
This example code is in the public domain.
3535
36-
http://www.arduino.cc/en/Tutorial/LiquidCrystal
36+
http://arduino.cc/en/Tutorial/LiquidCrystalCursor
37+
3738
*/
3839

3940
// include the library code:

Diff for: libraries/LiquidCrystal/examples/Display/Display.ino

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
3434
This example code is in the public domain.
3535
36-
http://www.arduino.cc/en/Tutorial/LiquidCrystal
36+
http://arduino.cc/en/Tutorial/LiquidCrystalDisplay
37+
3738
*/
3839

3940
// include the library code:

Diff for: libraries/LiquidCrystal/examples/Scroll/Scroll.ino

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
3434
This example code is in the public domain.
3535
36-
http://www.arduino.cc/en/Tutorial/LiquidCrystal
36+
http://arduino.cc/en/Tutorial/LiquidCrystalScroll
37+
3738
*/
3839

3940
// include the library code:

Diff for: libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
3333
This example code is in the public domain.
3434
35-
http://www.arduino.cc/en/Tutorial/LiquidCrystal
35+
http://arduino.cc/en/Tutorial/LiquidCrystalSerial
3636
*/
3737

3838
// include the library code:

Diff for: libraries/LiquidCrystal/examples/TextDirection/TextDirection.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
3333
This example code is in the public domain.
3434
35-
http://www.arduino.cc/en/Tutorial/LiquidCrystal
35+
http://arduino.cc/en/Tutorial/LiquidCrystalTextDirection
3636
3737
*/
3838

@@ -49,7 +49,6 @@ void setup() {
4949
lcd.begin(16, 2);
5050
// turn on the cursor:
5151
lcd.cursor();
52-
Serial.begin(9600);
5352
}
5453

5554
void loop() {

Diff for: libraries/LiquidCrystal/examples/setCursor/setCursor.ino

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
3333
This example code is in the public domain.
3434
35-
http://www.arduino.cc/en/Tutorial/LiquidCrystal
35+
http://arduino.cc/en/Tutorial/LiquidCrystalSetCursor
36+
3637
*/
3738

3839
// include the library code:

Diff for: libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SoftwareSerial mySerial(2, 3); // RX, TX
2323
void setup()
2424
{
2525
// Open serial communications and wait for port to open:
26-
Serial.begin57600;
26+
Serial.begin(57600);
2727
while (!Serial) {
2828
; // wait for serial port to connect. Needed for Leonardo only
2929
}

Diff for: libraries/Stepper/examples/stepper_speedControl/stepper_speedControl.ino

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ const int stepsPerRevolution = 200; // change this to fit the number of steps p
2626
// initialize the stepper library on pins 8 through 11:
2727
Stepper myStepper(stepsPerRevolution, 8,9,10,11);
2828

29-
int stepCount = 0; // number of steps the motor has taken
29+
int stepCount = 0; // number of steps the motor has taken
3030

3131
void setup() {
32-
// initialize the serial port:
33-
Serial.begin(9600);
32+
// nothing to do inside the setup
3433
}
3534

3635
void loop() {

0 commit comments

Comments
 (0)