CPP 215
MIKAEEL9 Guest on 14th October 2023 08:53:11 AM
  1. #define button 4
  2. #define led 7
  3.  
  4. void setup() {
  5.   pinMode(led, OUTPUT);
  6.   pinMode(button, INPUT);
  7. }
  8.  
  9. void loop() {
  10.   while(digitalRead(button)){
  11.     digitalWrite(led, HIGH);
  12.   }
  13.   digitalWrite(led, LOW);
  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.