Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define led 13
- #define pin12 12
- // the setup routine runs once when you press reset:
- void setup() {
- // initialize the digital pin as an output.
- pinMode(led, OUTPUT);
- pinMode(pin12,INPUT);
- // Serial.begin(9600);
- }
- // the loop routine runs over and over again forever:
- void loop() {
- int value=digitalRead(pin12);
- digitalWrite(led, value);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement