CPP 179
S9 Abdi Guest on 14th October 2023 09:02:56 AM
  1. #define LED_1 4
  2. #define buttom 6
  3. void setup() {
  4.   pinMode(LED_1,OUTPUT);
  5.   pinMode(buttom,INPUT);
  6. }
  7. void loop() {
  8.   if(digitalRead(buttom) == 0){
  9.     digitalWrite(LED_1,1);
  10.   }
  11.   else
  12.    digitalWrite(LED_1,0);
  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.