Created
September 20, 2019 05:17
-
-
Save deviceplususer/8f253670a31a983a83bc8e9b6e782ca4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int DIN_PIN = 7; | |
const int LED_PIN = 13; | |
void setup(){ | |
pinMode( DIN_PIN, INPUT_PULLUP ); | |
pinMode( LED_PIN, OUTPUT ); | |
} | |
void loop(){ | |
int value; | |
value = digitalRead( DIN_PIN ); | |
if ( value == HIGH ){ | |
digitalWrite( LED_PIN, LOW ); | |
}else{ | |
digitalWrite( LED_PIN, HIGH ); | |
} | |
delay( 100 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi if I connect my switch to PC0 pin , then DIN_PIN will be equal to what?