CPP 83
Najaf 9 Guest on 14th October 2023 08:56:32 AM
  1. #define LED 3
  2. #define button 4
  3. void setup() {
  4.   pinMode(LED,OUTPUT);
  5.   pinMode(button,INPUT);
  6. }
  7. void loop() {
  8.   if(digitalRead(button) == 0){
  9.     digitalWrite(LED,HIGH);
  10.   }
  11.   else
  12.    digitalWrite(LED,LOW);
  13.  
  14. }

Hightechrobo bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.