thanks mark, I get what your saying.
With it taking the lcd_time from the millis will show wether or not an interval of 1000 has passed
Ive implemented this and this is how it looks
#include <LiquidCrystal.h>
int display_delay = 1000;
unsigned long int lcd_time = 0;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
char* count[]={"1 second", "2 seconds", "3 seconds"};
const int sec = 3;
void setup()
{
Serial.begin(9600);
lcd.begin(16, 2);
lcd.clear();
}
void loop()
{
if(millis() - lcd_time >= display_delay)
{
lcd_time += display_delay ;
lcd.clear();
for(int i = 0; i < sec; i++)
{
lcd.setCursor(3,0);
lcd.print(count[i]);
Serial.println(count[i]);
}
}
}
what happens now is every second it prints all three quotes rather than working its way through the array
this an be seen in the serial monitor
I was basing the original idea for this on a bit of code that I wrote with a delay
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
char* count[]={"1 second", "2 seconds", "3 seconds"};
const int sec = 3;
const int time[sec] = {1, 1, 1};
const int sec_length = 1000;
void setup()
{
lcd.begin(16, 2);
lcd.clear();
Serial.begin(9600);
}
void loop()
{
lcd.clear();
for (int i = 0; i < sec; i++)//array through the notes
{
lcd.setCursor(3,0);
lcd.print(count[i]);
delay(time[i] * sec_length);
}
}
this work perfectly, working its way through the array in second intervals
you were saying crossroads that there was any value for count
is was thinking the value input is in the char* count[] array