i need to embed the push button code in the original code to select between 2 functions ( loop1() and loop2() )
void loop()
{
if (digitalRead(anInput) == HIGH)
{
loop1();
}
else
{
loop2();
}
}
i need to embed the push button code in the original code to select between 2 functions ( loop1() and loop2() )
void loop()
{
if (digitalRead(anInput) == HIGH)
{
loop1();
}
else
{
loop2();
}
}