Рет қаралды 140,415
2 limit switches wiring using same pin Arduino
void setup() {
Serial.begin(9600);
// put your setup code here, to run once:
pinMode( 7 , INPUT );
pinMode( 13, OUTPUT); // LED FOR TEST
digitalWrite(13,LOW);
}
void loop() {
// put your main code here, to run repeatedly:
if( digitalRead(7) == LOW ){
digitalWrite(13,HIGH);
}else{
digitalWrite(13,LOW);
}
} ::::::::::: SUPPORT CHANNEL ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Please Donate To Help Me Afford New Equipment And Software To Make My Videos More : goo.gl/1m8Dg2
Don't forget to subscribe!