Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int ledPin = 9;
- int sensePin = 2;
- int ledPinX = 7;
- int inputPin = 1;
- void setup() {
- Serial.begin(9600);
- pinMode(ledPin, OUTPUT);
- pinMode(inputPin, INPUT);
- pinMode(ledPinX, OUTPUT);
- // val = digitalRead(inputPin);
- }
- void loop() {
- int val;
- val = digitalRead(inputPin);
- digitalWrite(ledPinX, val);
- }
- //If you know about arduinos: help me out at http://arduino.stackexchange.com/questions/1189/why-does-my-wired-button-always-read-high
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement