Skip to content

Commit 110001f

Browse files
authored
Update loop.adoc
There is a typo in lines 40, 49 and 51. Line 40: Was: beginSerial(9600); Now: Serial.begin(9600); Line 49: Was: serialWrite('H'); Now: Serial.write('H'); Line 51: Was: serialWrite('L'); Now: Serial.write('L'); After I made the above proposed changes, the syntax agreed with the existing documentation for "Serial.begin" and "Serial.write" and the little demo program started to work as expected. Sincerely, ZWahl
1 parent cb2452b commit 110001f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Language/Structure/Sketch/loop.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int buttonPin = 3;
3737
// setup initializes serial and the button pin
3838
void setup()
3939
{
40-
beginSerial(9600);
40+
Serial.begin(9600);
4141
pinMode(buttonPin, INPUT);
4242
}
4343
@@ -46,9 +46,9 @@ void setup()
4646
void loop()
4747
{
4848
if (digitalRead(buttonPin) == HIGH)
49-
serialWrite('H');
49+
Serial.write('H');
5050
else
51-
serialWrite('L');
51+
Serial.write('L');
5252
5353
delay(1000);
5454
}

0 commit comments

Comments
 (0)