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
int led = 13; | |
int btn = 12; | |
int btnState = 0; | |
void setup() | |
{ | |
pinMode(led, OUTPUT); | |
pinMode(btn, INPUT); | |
digitalWrite(led, LOW); |
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
int led = 2; | |
int btn = 34; | |
int btnState = 0; | |
void setup() | |
{ | |
pinMode(led, OUTPUT); | |
pinMode(btn, INPUT); | |
digitalWrite(led, LOW); |
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
[{"id":"83c45ffc.002cb","type":"tab","label":"Simply Embedded Pi Zero - iMicon","disabled":false,"info":""},{"id":"c9befbbf.818d18","type":"inject","z":"83c45ffc.002cb","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":530,"y":321,"wires":[["8ac601ad.c4f4e","f64862.57ae27a"]]},{"id":"8ac601ad.c4f4e","type":"rpi-gpio out","z":"83c45ffc.002cb","name":"","pin":"37","set":true,"level":"0","freq":"","out":"out","x":720,"y":361,"wires":[]},{"id":"ba9c03f4.0f14f","type":"inject","z":"83c45ffc.002cb","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":530,"y":361,"wires":[["8ac601ad.c4f4e","f64862.57ae27a"]]},{"id":"f64862.57ae27a","type":"debug","z":"83c45ffc.002cb","name":"Relay","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":710,"y":321,"wires":[]},{"id":"bae43c01.6171","type":"comment","z":"83c45ffc.002cb","name":"สั่งงาน |
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
//Example Sketch ESP32: | |
int relay1 = 26; | |
int relay2 = 25; | |
int relay3 = 33; | |
int relay4 = 32; | |
void setup() { | |
pinMode(relay1, OUTPUT); | |
pinMode(relay2, OUTPUT); |
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
//Example Sketch Arduino nano: | |
// Asign output PIN | |
int relay1 = 2;//PIN D2 | |
int relay2 = 3;//PIN D3 | |
int relay3 = 4;//PIN D4 | |
int relay4 = 5;//PIN D5 | |
void setup() { | |
pinMode(relay1, OUTPUT); | |
pinMode(relay2, OUTPUT); |
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
//Assign output PIN | |
int relay1 = 2; //PIN D2 | |
int relay2 = 3; //PIN D3 | |
int relay3 = 4; //PIN D4 | |
void setup() { | |
pinMode(relay1, OUTPUT); | |
pinMode(relay2, OUTPUT); | |
pinMode(relay3, OUTPUT); | |
} |