Arduino Project 047 - Relay Control Switch
Project 47 Relay Control Switch
/* Project 47 Relay Control * Coding by Ronwang * This example code is in the public domain * Hardware Support by Autaba Website :https://www.autabaec.com */ // The Arduino pin, which connects to the IN pin of relay const int RELAY_LIGHT= 8; // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin as an output. pinMode(RELAY_LIGHT, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(RELAY_LIGHT, HIGH); delay(1000); digitalWrite(RELAY_LIGHT, LOW); delay(1000); }
版权声明:本文为原创文章,版权归donstudio所有,欢迎分享本文,转载请保留出处!