Created
June 13, 2025 04:29
-
-
Save maxpromer/982e20b3353b8193e5120cffef4f6167 to your computer and use it in GitHub Desktop.
C3-Relay Blink
This file contains hidden or 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
void setup() { | |
pinMode(3, OUTPUT); // กำหนดขาเชื่อมต่อรีเลย์ (GPIO3) เป็นดิจิทัลเอาต์พุต | |
} | |
void loop() { | |
digitalWrite(3, HIGH); // สั่งรีเลย์ทำงาน | |
delay(1000); // หน่วงเวลา 1 วินาที (1000 mS) | |
digitalWrite(3, LOW); // สั่งรีเลย์หยุดทำงาน | |
delay(1000); // หน่วงเวลา 1 วินาที (1000 mS) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment