Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Declare Constants and variables
- const byte Button=8;
- const byte Button2=9;
- const byte Button3=10;
- const byte Button4=11;
- byte ReadVal; // variable to read button
- //const byte LedPin2 = 19
- void setup() {
- pinMode(Button, INPUT);
- pinMode(Button2, INPUT);
- pinMode(Button3, INPUT);
- pinMode(Button4, INPUT);
- Serial.begin(9600);
- }
- void loop() {
- ReadVal = digitalRead(Button4); //when on the ReadVal should be 1 and off should be 0, otherwise it is not being read
- Serial.println(ReadVal);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement