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...

Комментарии • 38

  • @enisykin4475
    @enisykin4475 2 года назад

    god bless you! my bad-trigonometry was missed...

    • @marios_ideas
      @marios_ideas  2 года назад

      :) Give a video a like if you enjoyed it. Helps me a lot

  • @tatageek
    @tatageek 4 года назад

    Nice project, quite useful.
    These SSD1306 OLED modules are great, I use one in my smog sensor, and it does the job :)

    • @marios_ideas
      @marios_ideas  4 года назад

      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.

    • @tatageek
      @tatageek 4 года назад

      @@marios_ideas Arduino Nano could be better choice if size is important

    • @marios_ideas
      @marios_ideas  4 года назад +1

      tata.geek. I will go smaller:) Attiny85

  • @erment55
    @erment55 2 года назад

    I got it done, thank you

    • @marios_ideas
      @marios_ideas  2 года назад

      Thx:)Give video a like if you enjoyed it. It helps to grow my channel

  • @erment55
    @erment55 2 года назад

    you are awesome, great work as always, congratulations

    • @marios_ideas
      @marios_ideas  2 года назад

      Thanks:) Like the video if you enjoyed it

  • @shubham9672
    @shubham9672 2 года назад

    If we are using this SCL SDA pin for OLED
    Can we use those pin for another LED driving

  • @davidkempton2894
    @davidkempton2894 3 года назад

    Nice video and nice explanations!👍

    • @marios_ideas
      @marios_ideas  3 года назад

      Thanks. Comments like this make it all worth it:)

  • @erment55
    @erment55 2 года назад

    If we do the same work for a 1.3 inch 128x64 SH1106 oled screen, what kind of sketch should it be?

    • @marios_ideas
      @marios_ideas  2 года назад

      Google SH1106 and arduino library. You should have few libraries to choose from.

  • @kristinwagoner6688
    @kristinwagoner6688 3 года назад

    Awesome! Think this build could handle two OLED displays?

    • @marios_ideas
      @marios_ideas  3 года назад +1

      I don't see why not:)

    • @kristinwagoner6688
      @kristinwagoner6688 3 года назад

      @@marios_ideas I'm going to try to adapt this for a build of mine. Thanks for the response! ^>^

  • @LuisVazquez-kj1ym
    @LuisVazquez-kj1ym 3 года назад

    Hello great job, but x=r*cos(angle) and y=r*sin(angle)

    • @marios_ideas
      @marios_ideas  3 года назад

      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.

    • @LuisVazquez-kj1ym
      @LuisVazquez-kj1ym 3 года назад

      @@marios_ideas ok

  • @LuisVazquez-kj1ym
    @LuisVazquez-kj1ym 4 года назад

    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?

    • @marios_ideas
      @marios_ideas  4 года назад

      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:)

  • @davidkempton2894
    @davidkempton2894 3 года назад

    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.

    • @marios_ideas
      @marios_ideas  3 года назад

      Can you give me the exact time. I will check and add the note in the description. Did I swap them around?

    • @davidkempton2894
      @davidkempton2894 3 года назад

      @@marios_ideas Hi. Its in your arduino projecthub documentation.

  • @tiejunchen6974
    @tiejunchen6974 4 года назад

    Thank you very much!

  • @davidkempton2894
    @davidkempton2894 3 года назад

    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);

    • @marios_ideas
      @marios_ideas  3 года назад

      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);

    • @davidkempton2894
      @davidkempton2894 3 года назад

      @@marios_ideas That's interesting... I wonder what version of your code i was looking at then...? 🤔

    • @marios_ideas
      @marios_ideas  3 года назад

      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)

  • @SoothingAuraTracks
    @SoothingAuraTracks Год назад

    the codes please

    • @marios_ideas
      @marios_ideas  Год назад

      I have added one extra link. Let me know if it works

  • @driss25
    @driss25 2 года назад

    Not push button

    • @marios_ideas
      @marios_ideas  2 года назад

      ??? Explain

    • @elementalwattson
      @elementalwattson Год назад

      @@marios_ideas He wants to add buttons to set the hours and minutes manually. Without making his own code -_-