Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LwTx.h>
- byte zapnout[] = {0,0,0,0,0,0,0,0,0,1};
- byte vypnout[] = {0,0,0,0,0,0,0,0,0,0};
- void setup() {
- Serial.begin(9600);
- // nastaví pin 4 a 5 jako vstup
- pinMode(4, INPUT);
- pinMode(5, INPUT);
- lwtx_setup(3, 2);
- }
- void loop()
- {
- if (digitalRead(4) == 1) {Zapnout();delay(400);}
- if (digitalRead(5) == 1) {Vypnout();delay(400);}
- }
- void Zapnout()
- {
- if (lwtx_free())
- {
- lwtx_send(zapnout);
- }
- }
- void Vypnout()
- {
- if (lwtx_free())
- {
- lwtx_send(vypnout);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement