hi i was playing with arduino simulator and was trying to make led 1 ON when i press the button and when release make it OFF.
but i am finding difficulty like when i press button led 1 is on ,then on second press i want LED 2 on .
so please help me with that
this is the code i was trying .
void loop()
{
while(digitalRead(3)== LOW )
{
digitalWrite(count1, HIGH);
}
digitalWrite(count1, LOW);
}
but i am finding difficulty like when i press button led 1 is on ,then on second press i want LED 2 on .
so please help me with that
this is the code i was trying .
void loop()
{
while(digitalRead(3)== LOW )
{
digitalWrite(count1, HIGH);
}
digitalWrite(count1, LOW);
}