Skip to content

Instantly share code, notes, and snippets.

@maxpromer
Created January 1, 2025 11:38
Show Gist options
  • Save maxpromer/363c49aad815e335c90d34ddf7b6edbb to your computer and use it in GitHub Desktop.
Save maxpromer/363c49aad815e335c90d34ddf7b6edbb to your computer and use it in GitHub Desktop.
#define RELAY_PIN (5) // ขาที่ต่อรีเลย์
void setup() {
pinMode(RELAY_PIN, OUTPUT);
}
void loop() {
digitalWrite(RELAY_PIN, LOW); // สั่งโซลินอยด์ทำงาน
delay(2000);
digitalWrite(RELAY_PIN, HIGH); // สั่งโซลินอยด์หยุดทำงาน
delay(2000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment