Skip to content

Commit

Permalink
Fixed example StringStartsWithEndsWith.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie authored and jenscski committed May 12, 2014
1 parent 8f4c11a commit 1c896a4
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -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:
Expand Down

0 comments on commit 1c896a4

Please sign in to comment.