(Newbie) Arduino problem with millis and others

Hello,

I have recently installed Arduino on my laptop and I wanted to “Run”" my first code but was not working as I expected. I want to program a clock which shows on the first line of my LCD the message “My first clock” the right below the message it shows a timer which starts from 00 : 00 (exactly like that) and when reaches 00 : 59 (for example) it goes back to 0 ( 00 : 00). How can i do that ??

I will put my code here so you guys can help me out , thanks in advance. I am a newbie in programming and at Arduino so take me slowly :frowning:

#include <LiquidCrystal.h>

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
unsigned char;
void setup() {

lcd.begin(16, 2);

lcd.print(“My first Clock”);

PinMode(controlPin, OUTPUT);
digitalWrite(controlPin, LOW);
currentTimeValue[0]=‘0’;
currentTimeValue[1]=‘0’;
currentTimeValue[2]=‘0’;
currentTimeValue[3]=‘0’;
showEnteredTime();

}

void loop() {

int reset = 0;

lcd.setCursor(0, 1);

lcd.print(millis() / 100);
if (millis >= 59)
reset;

}

Try to get an even simpler sketch working first. Use Google to look for a "Hello World" type example for your LCD. Come back when you have some code which will compile.

#include <config.h>
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {

lcd.begin(16, 2);

}

void loop() {

lcd.setCursor(0, 0);
lcd.print(“My First Clock”);

lcd.setCursor(2,8);
lcd.print(millis () / 1000);

}

This code compiles, I dont get any errores
Under “lcd.print(millis () / 1000 );” I want to add a line/operation where when my counter goes up till 00:59 it resets to 0. Can somebody please help me with that? I would much appreciate it. Thanks in advance

Maybe have just these 2 in the loop():

lcd.setCursor(1,8);   // bottom row, column 8
lcd.print( ( millis () / 1000) % 60 );   // runs from 0 to 59 seconds

These statements could go in setup:

lcd.setCursor(0, 0);
lcd.print("My First Clock");

And have a look this: https://www.arduino.cc/en/Tutorial/HelloWorld