Ultizin

Grupo 3 | Projeto 6

Jul 27th, 2025
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. int pinoSensor = 8;
  2. int pinoLED = 13;
  3.  
  4. void setup() {
  5.   pinMode(pinoSensor, INPUT);
  6.   pinMode(pinoLED, OUTPUT);
  7. }
  8.  
  9. void loop() {
  10.   if (digitalRead(pinoSensor) == HIGH) {
  11.     digitalWrite(pinoLED, HIGH);
  12.     delay(100);
  13.   } else {
  14.     digitalWrite(pinoLED, LOW);
  15.   }
  16.   delay(100);
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment