Last active
June 22, 2018 05:07
-
-
Save penpencool/c79e42bfff713ce769c6e9cefe5edca0 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
/* | |
ตัวอย่างโคด ArduinoAll LJ18A3-8-Z | |
สายสีน้ำเงิน - GND | |
สายสีน้ำตาล - 5V | |
สายสีดำ - 7 | |
*/ | |
void setup() { | |
Serial.begin(9600); | |
Serial.println("ArduinoAll Example LJ18A3-8-Z"); | |
} | |
void loop() { | |
int detect = digitalRead(7); | |
if (detect == 1) { | |
Serial.println("Found"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment