mirror of https://github.com/noisymime/Arduino.git
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…
Reference in New Issue