Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Variável global
- char msg[20];
- void setup(){
- //Configura a comunicação serial
- Serial.begin(9600);
- //Configura o pino 3 com pull up interno (input)
- pinMode(3,2);
- }
- void loop(){
- sprintf(msg, "DI3:%i;\n", digitalRead(3));
- Serial.print(msg);
- delay(2000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement