Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define botao 2
- #define rele 5
- void setup()
- {
- pinMode(botao, INPUT_PULLUP);
- pinMode(rele, OUTPUT);
- }
- void loop()
- {
- if (digitalRead(botao == LOW))
- {
- delay(30);
- }
- if (digitalRead(botao == LOW))
- {
- digitalWrite(rele, !digitalRead(botao));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement