Skip to content

Commit 9262bb9

Browse files
committed
Merge branch 'new-extension' of github.com:arduino/Arduino into diskloader_reboot
Conflicts: hardware/arduino/variants/mega/pins_arduino.h libraries/Ethernet/examples/PachubeClient/PachubeClient.ino libraries/Ethernet/examples/PachubeClientString/PachubeClientString.ino
2 parents 2361d99 + bddc274 commit 9262bb9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

examples/4.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
Created 26 Sept. 2005
2121
by Tom Igoe
22-
modified 30 Aug 2011
22+
modified 26 Oct 2011
2323
by Tom Igoe and Scott Fitzgerald
2424
2525
This example code is in the public domain.
@@ -47,12 +47,10 @@ void loop()
4747
if (Serial.available() > 0) {
4848
// get incoming byte:
4949
inByte = Serial.read();
50-
// read first analog input, divide by 4 to make the range 0-255:
51-
firstSensor = analogRead(A0)/4;
52-
// delay 10ms to let the ADC recover:
53-
delay(10);
54-
// read second analog input, divide by 4 to make the range 0-255:
55-
secondSensor = analogRead(A1)/4;
50+
// read first analog input:
51+
firstSensor = analogRead(A0);
52+
// read second analog input:
53+
secondSensor = analogRead(A1);
5654
// read switch, map it to 0 or 255L
5755
thirdSensor = map(digitalRead(2), 0, 1, 0, 255);
5856
// send sensor values:

0 commit comments

Comments
 (0)