if I put this in main before loop it works if I call it from loop. when I move it to a new tab none of the global variables are available . How do I make the tab part of the main so I can do this ?
I have tried #include "tabname.ino" but it don't work.
void LcdUpdate ()
{
if (((currentMillis - currentMillis3) > (1000)) && (digitalRead(A7) == 1))
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Interval mS");
lcd.setCursor(12, 0);
lcd.print(Interval * 2);
lcd.setCursor(0, 1);
lcd.print("Duration mS");
lcd.setCursor(12, 1);
lcd.print(Duration);
lcd.setCursor(0, 2);
lcd.print("A7");
lcd.setCursor(12, 2);
lcd.print(digitalRead(button));
lcd.setCursor(0, 3);
lcd.print("POT A4");
lcd.setCursor(12, 3);
lcd.print(analogRead(Pot));
currentMillis3 = currentMillis;
}
}