How to create Arduino analog style clock
HTML-код
- Опубликовано: 4 сен 2024
- In this video I will use Arduino UNO, RTC Module and SPI OLED Display.
The project description including the code can be found here
create.arduino...
or here
www.hackster.i...
The libraries can be downloaded from:
github.com/ada...
github.com/ada...
github.com/chr...
Here are the links to components:
pl.aliexpress....
pl.aliexpress....
pl.aliexpress....
If you like this content and you want to support me in creating similar videos go to my Patreon webpage
/ mariosideas
Or
www.paypal.com...
god bless you! my bad-trigonometry was missed...
:) Give a video a like if you enjoyed it. Helps me a lot
Nice project, quite useful.
These SSD1306 OLED modules are great, I use one in my smog sensor, and it does the job :)
Thanks. I will do another video where I will try to put this on my rist. So I have to scale down the components and probably create the custom PCB to avoid having all the cables.
@@marios_ideas Arduino Nano could be better choice if size is important
tata.geek. I will go smaller:) Attiny85
I got it done, thank you
Thx:)Give video a like if you enjoyed it. It helps to grow my channel
you are awesome, great work as always, congratulations
Thanks:) Like the video if you enjoyed it
If we are using this SCL SDA pin for OLED
Can we use those pin for another LED driving
Nice video and nice explanations!👍
Thanks. Comments like this make it all worth it:)
If we do the same work for a 1.3 inch 128x64 SH1106 oled screen, what kind of sketch should it be?
Google SH1106 and arduino library. You should have few libraries to choose from.
Awesome! Think this build could handle two OLED displays?
I don't see why not:)
@@marios_ideas I'm going to try to adapt this for a build of mine. Thanks for the response! ^>^
Hello great job, but x=r*cos(angle) and y=r*sin(angle)
You got me there:) I played with those values so that theclock hands would start in the right place and move in the right direction.
@@marios_ideas ok
Hello, thank you for share i make it for DS1307 clock and library related, works great!!, how can add the mp3 tf 16p module (DFPlayer mini) to simulate a cuckoo clock?
I will get eventually to making the video about the MP3 but it is not in my imediate pipeline. If you are in the hurry look for other maker's video:)
Hi, there is an error in your schematics. The SCL and SCA connections are not correct on the OLED Display symbol. Compare the instruction comments at the top of the code.
Can you give me the exact time. I will check and add the note in the description. Did I swap them around?
@@marios_ideas Hi. Its in your arduino projecthub documentation.
Thank you very much!
Thanks:)
Thanks for visiting my channel:)
Your code is excellent. But there is an error in it. When you write over the seconds and minutes and hours with black to remove them you use the *latest* time rather than the *previous* time. So it doesnt work. I have put the code I amended below:
if (tm.Second!=seconds){
//draw_second(tm.Second,0);Original code had this so "second circles" never disappeared and just filled up the face!
draw_second(seconds,0);//write over old second position
draw_minute(minutes,0);//ditto
draw_hour(hours,minutes,0);//ditto
draw_second(tm.Second,1);//write new second position
draw_minute(tm.Minute,1);
draw_hour(tm.Hour,tm.Minute,1);
I checked and I am not certain if my code has an error.
I have the same code in my video in arduino.cc and in Arduino IDE and in the video you see that the face clock is shown ok.
The code block you refer to is:
if (myRTC.seconds!=seconds){
draw_second(seconds,0);
draw_minute(minutes,0);
draw_hour(hours,minutes,0);
@@marios_ideas That's interesting... I wonder what version of your code i was looking at then...? 🤔
The thing is that for this block it is the same in all three places where the code i stored (in video itself, arduino IDE and Arduino.cc) Also check the comments in the code I added above. The code is doing exactly what I want.
Have you used
redraw_clock_face_elements() function at the end of main loop?Without it some of the clock face elements are messed up by erasing clock hands (drawing the lines in black)
the codes please
I have added one extra link. Let me know if it works
Not push button
??? Explain
@@marios_ideas He wants to add buttons to set the hours and minutes manually. Without making his own code -_-