mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Changed analog references to use new A0 through A5 notation
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
You can also add several different data types to string, as shown here:
|
||||
|
||||
created 27 July 2010
|
||||
modified 4 Sep 2010
|
||||
by Tom Igoe
|
||||
|
||||
http://arduino.cc/en/Tutorial/StringAdditionOperator
|
||||
@ -44,10 +45,10 @@ void loop() {
|
||||
Serial.println(stringThree); // prints "You added this string"
|
||||
|
||||
// adding a variable integer to a string:
|
||||
int sensorValue = analogRead(0);
|
||||
int sensorValue = analogRead(A0);
|
||||
stringOne = "Sensor value: ";
|
||||
stringThree = stringOne + sensorValue;
|
||||
Serial.println(stringThree); // prints "Sensor Value: 401" or whatever value analogRead(0) has
|
||||
Serial.println(stringThree); // prints "Sensor Value: 401" or whatever value analogRead(A0) has
|
||||
|
||||
// adding a variable long integer to a string:
|
||||
long currentTime = millis();
|
||||
|
Reference in New Issue
Block a user