mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-30 19:52:13 +01:00
Fixed example StringStartsWithEndsWith.ino
This commit is contained in:
parent
a74597dceb
commit
9c7e3ab4c3
@ -42,12 +42,11 @@ void loop() {
|
||||
String sensorReading = "sensor = ";
|
||||
sensorReading += analogRead(A0);
|
||||
Serial.print (sensorReading);
|
||||
if (sensorReading.endsWith(0)) {
|
||||
if (sensorReading.endsWith("0")) {
|
||||
Serial.println(". This reading is divisible by ten");
|
||||
}
|
||||
else {
|
||||
Serial.println(". This reading is not divisible by ten");
|
||||
|
||||
}
|
||||
|
||||
// do nothing while true:
|
||||
|
Loading…
x
Reference in New Issue
Block a user