Thank you, but I was unable to make that code work. I have working code that displays hour, minute, and second as integer, but I cannot format it on the lcd. I would like the output to be formatted nice and tight across lcd.
Thank you, but I was unable to make that code work.
This compiles:
#include "LCD12864RSPI.h"
void setup()
{
LCDA.Initialise(); // INIT SCREEN
int hour = 12;
int minute = 47;
int second = 23;
unsigned char timeString[12];
sprintf((char *)timeString, "%02d:%02d:%02d", hour, minute, second);
LCDA.DisplayString(0,1,timeString, strlen((char *)timeString));
}
void loop()
{
}
I should have suspected earlier that the library was from dfrobot. I wouldn't buy anything from them if it was free. They provide no support for Arduino.
Thank you very much for that code. It works great! What hardware manufacturer would you reccomend that would be easier to work with throughout this project?
The RTC you are using probably has a setting that tells it whether you want the time in 12 hour or 24 hour format. I don't know what RTC that is, though, so I can't tell you what that setting is.
I am in Ohio, USA, but I order all my hardware from internet.
Sparkfun is on the internet. They pissed me, and a whole lot of other people, off with their "free day" fiasco a couple of years ago, but when I want something that I know will work and I want it now, I order from them.