How to use DS1307 RTC with Arduino + LCD/OLED 12h/24h formats

  Рет қаралды 8,391

SurtrTech

SurtrTech

Күн бұрын

Hello, and welcome to this tutorial where I use another RTC module, this time we have the DS1307 module, and I'm using it with an Arduino UNO board, then I'm using an OLED screen and LCD i²c screen to display multiple formats of date and time and in both 24h and 12h format. any problem leave a question in the comments.
Consider a Subscribe to support the channel.
Wiring and codes:
surtrtech.com/2...
Arduino RTC playlist:
bit.ly/2I7ZwFC
How to simply use RTC DS1302 with Arduino:
bit.ly/2YNpC6G
How to setup RTC DS1302 with keypad and Arduino:
bit.ly/2CLsjwb
EASY Arduino Alarm Clock based on DS1302 RTC:
bit.ly/2FIOvrI
How to simply use DS3231 RTC module with Arduino + OLED display:
bit.ly/2YGqhXD
Arduino Modules playlist:
bit.ly/2Dh4pJC
Arduino Projects playlist:
bit.ly/2Fxm2Y7
Arduino Shields playlist:
bit.ly/2APsndI
Facebook: / surtrtech
Twitter: / surtrtech

Пікірлер: 14
@anokhautomation4453
@anokhautomation4453 Жыл бұрын
Very useful tutorial 👍 thanks for sharing 🙏
@ManuPithiviers
@ManuPithiviers 4 жыл бұрын
Thank you !
@leeralph7765
@leeralph7765 5 жыл бұрын
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.
@SurtrTech
@SurtrTech 5 жыл бұрын
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
@leeralph7765 5 жыл бұрын
@@SurtrTech ah, there we go, all working. Thank you very much for your help and keep up the good work.
@leeralph7765
@leeralph7765 5 жыл бұрын
@@SurtrTech and also a bit of fault finding found a dodgy battery fitted to the back of the rct 😣
@SurtrTech
@SurtrTech 5 жыл бұрын
@@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
@sergiomoranavarrete9426
@sergiomoranavarrete9426 5 жыл бұрын
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?
@SurtrTech
@SurtrTech 5 жыл бұрын
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
@rickyamri7643
@rickyamri7643 4 жыл бұрын
hello, how to set the time?
@thomaswilkerson9961
@thomaswilkerson9961 4 жыл бұрын
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
@SurtrTech
@SurtrTech 4 жыл бұрын
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".
@thomaswilkerson9961
@thomaswilkerson9961 4 жыл бұрын
@@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,
@SurtrTech
@SurtrTech 4 жыл бұрын
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
How to use DS3231 RTC module to build OLED clock
15:34
Mario's Ideas
Рет қаралды 33 М.
I Built The First LAMINAR FLOW ROCKET ENGINE
15:51
Integza
Рет қаралды 2 МЛН
Je peux le faire
00:13
Daniil le Russe
Рет қаралды 20 МЛН
1ОШБ Да Вінчі навчання
00:14
AIRSOFT BALAN
Рет қаралды 6 МЛН
Arduino Real Time Clock - Using the Tiny RTC
31:29
DroneBot Workshop
Рет қаралды 201 М.
COMMUNISM vs CAPITALISM: Who Made Better Power Tools?
24:39
The Doubtful Technician
Рет қаралды 728 М.
Using EEPROM with Arduino - Internal & External
31:54
DroneBot Workshop
Рет қаралды 196 М.
Using LCD Displays with Arduino
46:23
DroneBot Workshop
Рет қаралды 1,7 МЛН
DS1307 RTC module With Arduino (Tiny RTC ).
8:05
MYTECTUTOR
Рет қаралды 57 М.
Arduino - DS1307 RTC
21:18
misperry
Рет қаралды 65 М.
How do I use a Real Time Clock with Arduino?  RTC 1307
10:29
Garage Geek Guy
Рет қаралды 19 М.