Evening Yassine. Thank you for this great tutorial, out of all I have seen this is the best. One problem though, have set this up and followed your tutorial to the letter (down loading everything from your site), I have run the simple program and the rtc worked really well, have run clock file 1 and 2 for oled and it looks great (better than I have attempted so far lol). But can not get the clock files to talk the rtc? (shows 12:00am 1/1/2001). Any idea where I may be going wrong?. Using the same display and Same tiny rtc as seen in your video. Thank you for your time and thanks again for the tutorial.
Thanks a lot, did you try first to set the RTC using the first example? Upload the "SetTime" example first while the RTC is wired. Then try the other codes.
@@leeralph7765 Thank you very much, I'm happy it's working, normally those batteries last around 10 years, but if you could change it it would be better
Print2digits wors great thnak you I Can not get 12hr time, else if(Hour>12){ Hour=Hour-12; //substract 12 to bring it back to 1,2,3,... a=false; display.print(Hour); Please help tia
I don't understand your problem. The code detect which hour and if it's 0- under12 it shows normally and with a "am", if it's 12 it shows 12 with "pm", higher than 12 it goes back to 12h format with "pm" symbol. if it's 0 (midnight) it shows 12 "am".
@@SurtrTech Thanks for your response. Sorry but I confused my own questions with another video. Here I'm trying to get your OLED_3 sketch to put a zero in when hours, minutes, or seconds are less than 10 so there are 2 digits displayed. I tried using print2digits(tm.Second); along with void print2digits(int number) { if (number >= 0 && number < 10) { display.write('0'); display.display(); } display.print(number); display.display(); display.println(); } I give 2 digits but everything on the display after that command flickers i.e the PM,month, day, and year flash rapidly. any help is appreciated,
Well you'll have to create another function for example" print2digits(int and here it should read the hour/minute/sec). Inside the function you'll test if the variable is
Evening Yassine.
Thank you for this great tutorial, out of all I have seen this is the best.
One problem though, have set this up and followed your tutorial to the letter (down loading everything from your site), I have run the simple program and the rtc worked really well, have run clock file 1 and 2 for oled and it looks great (better than I have attempted so far lol). But can not get the clock files to talk the rtc? (shows 12:00am 1/1/2001). Any idea where I may be going wrong?. Using the same display and Same tiny rtc as seen in your video.
Thank you for your time and thanks again for the tutorial.
Thanks a lot, did you try first to set the RTC using the first example?
Upload the "SetTime" example first while the RTC is wired.
Then try the other codes.
@@SurtrTech ah, there we go, all working. Thank you very much for your help and keep up the good work.
@@SurtrTech and also a bit of fault finding found a dodgy battery fitted to the back of the rct 😣
@@leeralph7765 Thank you very much, I'm happy it's working, normally those batteries last around 10 years, but if you could change it it would be better
Hello, Thanks for the video, but I still can not print2digits on a ssh1106 u8glib. Is there any way to see it on an OLED?
Did you modify the function below? Because that function is not in the library, I just made it, make sure to adapt it to your display library too
hello, how to set the time?
Thank you !
Print2digits wors great thnak you
I Can not get 12hr time, else if(Hour>12){
Hour=Hour-12; //substract 12 to bring it back to 1,2,3,...
a=false;
display.print(Hour);
Please help tia
I don't understand your problem.
The code detect which hour and if it's 0- under12 it shows normally and with a "am", if it's 12 it shows 12 with "pm", higher than 12 it goes back to 12h format with "pm" symbol. if it's 0 (midnight) it shows 12 "am".
@@SurtrTech
Thanks for your response. Sorry but I confused my own questions with another video. Here I'm trying to get your OLED_3 sketch to put a zero in when hours, minutes, or seconds are less than 10 so there are 2 digits displayed. I tried using print2digits(tm.Second); along with
void print2digits(int number) {
if (number >= 0 && number < 10) {
display.write('0');
display.display();
}
display.print(number);
display.display();
display.println();
}
I give 2 digits but everything on the display after that command flickers i.e the PM,month, day, and year flash rapidly. any help is appreciated,
Well you'll have to create another function for example" print2digits(int and here it should read the hour/minute/sec).
Inside the function you'll test if the variable is