Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // C++ code
- // 2022-05-31
- void setup()
- {
- pinMode(13, OUTPUT);
- pinMode(7,INPUT);
- Serial.begin(9600);
- }
- void loop()
- {
- int Input = digitalRead(7);
- if(Input)
- {
- digitalWrite(13,HIGH);
- }
- else
- {
- digitalWrite(13,LOW);
- }
- Serial.println(Input);
- delay(200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement