Fixed example StringStartsWithEndsWith.ino

This commit is contained in:
Cristian Maglie 2014-04-07 19:07:49 +02:00
parent a74597dceb
commit 9c7e3ab4c3
1 changed files with 1 additions and 2 deletions

View File

@ -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: