Last active
November 24, 2019 07:20
-
-
Save penpencool/9ee2429f276ec33d7b95641932d18681 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Example By ArduinoAll.com | |
สายสีน้ำตาล - VCC 5-24V | |
สายสีน้ำเงิน - GND | |
สายสีเหลือง - A0 | |
*/ | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
if (digitalRead(A0) == 1) { | |
Serial.println("ArduinoAll Water Detect"); | |
} else { | |
Serial.println("No Water"); | |
} | |
delay(500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment