Arduino Project: Real time clock DS3231 and 1.8 Color TFT display ST7735

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024
  • Building a Real Time Clock (DS3231) with Arduino and a 1.8" color TFT display (ST7735) is very easy. All you need to do is to follow the steps we show in this video. The cost of the project is very low as well. You can build this project with around 10$. Impressive isn't it? That's the power of Arduino and open software.
    The code of the project is very simple and it is described in the video. In the .zip file that I share, you can find both version of the code, with temperature in Degrees C and degrees F.
    --------------------
    Code & Parts
    --------------------
    educ8s.tv/ardui...
    Want to learn to code?
    👨‍💻 Check my new TH-cam channel: bit.ly/3tku2n0

ความคิดเห็น • 129

  • @grahambrown9409
    @grahambrown9409 4 หลายเดือนก่อน

    Your code is generating the following error: Compilation error: redefinition of 'Adafruit_ST7735 tft'
    and stops at line 14
    Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
    I installed the Adafruit library ST7735 and ST7789, version 1.10.4
    Any ideas please?

  • @viisteist1363
    @viisteist1363 7 ปีที่แล้ว +2

    #include // Define the base class to std::allocator.
    ^
    compilation terminated.
    exit status 1

  • @viisteist1363
    @viisteist1363 7 ปีที่แล้ว +2

    well... after the errors are sorted out, i just get really weird hazy lines(4 in total) on the screen and do not see any text at all...?

  • @viisteist1363
    @viisteist1363 7 ปีที่แล้ว +1

    Sodaq_DS3231.cpp:12:26: fatal error: avr/pgmspace.h: No such file or directory ?

    • @viisteist1363
      @viisteist1363 7 ปีที่แล้ว

      In Sodaq_DS3231.cpp you have to replace
      #include
      with
      #if (defined(__AVR__))
      #include
      #else
      #include
      #endif

  • @DogRox
    @DogRox 9 ปีที่แล้ว +1

    Great job!!! I like the idea of refreshing the display only when it's needed. That's a good idea! :-) Also is that a different library for the real time clock then what you use the last time? I'm still fiddling around with the other previous library, I can't seem to get it to display Fahrenheit. I'm trying to convert Celsius to Fahrenheit with that formula but somehow my code isn't working. I may try this new library. I don't have the color display yet, but will soon because it looks cool :-)

    • @Educ8s
      @Educ8s  9 ปีที่แล้ว +1

      +Dog Rox Thanks, if you need any help with the code, drop me a line..

    • @DogRox
      @DogRox 9 ปีที่แล้ว

      Hi, I am manage to get the code to translate to Fahrenheit. The original code was the example code for the real time clock. There's a lot of it I still don't understand about that code, like the floats, the integers, and the dtostrf where it looks like its not even needed. I may just start from scratch, as it makes it easier to learn what's going on in the code. :-)

  • @jaarden
    @jaarden 3 ปีที่แล้ว

    Great project but i get an error code "redefinition of 'Adafruit_ST7735 tft'" Can you solve the problem

  • @varietedigital7567
    @varietedigital7567 6 ปีที่แล้ว

    Hi buddy I would need more information about how to make interactive buttons menu and SD card reading.Could you send me? I have the TJCTM24028 SPI module with XTP2046 controller compatible with ILI9341 libraries.

  • @MrStefi69
    @MrStefi69 ปีที่แล้ว

    Hi, I would like to ask about the time and date how to enter it, because it doesn't work for me.But everything works. thanks for the reply.

  • @robertbatchelor9072
    @robertbatchelor9072 7 ปีที่แล้ว

    Thank very much I have it up and running in few hours I enjoy is very much but which line of code to change the order of date also to change time to a 12 hour format also incorporate DTH11 or DTH22 .. Please when down loading software go slower and show more details.. any code I change would gladly share it with you for future subscribers..
    Thank You,
    Sincerely, Robert B
    USA, NJ

  • @ikarosdr.9436
    @ikarosdr.9436 5 ปีที่แล้ว

    sorry sir ! this line of code: DateTime dt(2015, 8, 27, 9, 35, 30, 4); I had changed but tft display is not change can you
    explan this problem to me please~

  • @markweir3653
    @markweir3653 8 ปีที่แล้ว

    Hi Nick,I have made this project and it seems to rum but my screen looks milky most of the time. If I press the Reset I get what looks like a normal screen for a few seconds until the reset happens. Any thoughts? I have checked my wiring, hardware and another TFT module.

  • @siddeshmp4156
    @siddeshmp4156 7 ปีที่แล้ว

    I'm doing similar project but want the time to be updated from D1 wifi board or any esp8266 wifi module, is it possible. If you have done any project please forward it

  • @dinoslmn
    @dinoslmn 3 ปีที่แล้ว

    Hi, setRTCTime() command will synchronize the PC system time with ds3231 module ?

  • @nielslarsen1094
    @nielslarsen1094 8 ปีที่แล้ว

    Hello Nick. Thank you for the educational motivation and supports.
    I am trying to get the 1,8" TFT display and Ds3231 to work, as per your video, but is struggling with the GFX.h library. I cant find the right one, or version. When I compile i get this message ""Arduino\libraries\Adafruit_ST7735_Library/Adafruit_ST7735.h:34:26: fatal error: Adafruit_GFX.h: No such file or directory" ??
    What am I doing wrong?
    Thank you Niels,
    Denmark

  • @tweety01402
    @tweety01402 8 ปีที่แล้ว

    hi...video at 4:08.the screen flicker to update the value.this is big problem with this lcd library.if you can fix this this it would be great.

  • @steven67856
    @steven67856 7 ปีที่แล้ว

    Hi can you help I built your real time clock but I cannot change the day in the program and the temperature is not reading correctly I am new two ardiuno so hope you pint me in the right direction.
    Many Thanks Steven.

  • @devi-uu3ts
    @devi-uu3ts 5 ปีที่แล้ว

    sir i am using DHT11 instead of real time clock DS3231 so can you please tell me the connections and code

  • @danielnasif4471
    @danielnasif4471 8 ปีที่แล้ว +1

    Do you have a video or could you make one that would use the time as a condition that if the time is between (X:XX) and (X:XX) then a relay is activated or something to that nature?

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      +Daniel Nasif Yes, that's a nice project to build!

  • @Cambria399
    @Cambria399 8 ปีที่แล้ว

    Thank you sir, very good teaching. I want to build this but I have a macintosh. I put the ide from arduino but the vendor says the Uno not good for mac. Must be pc to flash with sketch?

  • @steven67856
    @steven67856 4 ปีที่แล้ว

    Hi I made the above item and it is up and running but I am unable to reset the temperature as it is to high I am relieve new to arduino hope you can help.
    Steven

  • @gersomadu8100
    @gersomadu8100 5 ปีที่แล้ว

    I want to replace the min temperature and max temperature at the bottom of the display and make it an alarm? How will i change that in the code ?

  • @papurceviv
    @papurceviv 7 ปีที่แล้ว

    I have not understood the connections of the display to arduino.
    Please help me.

  • @MPElectronique
    @MPElectronique 9 ปีที่แล้ว

    Educs, i would like to edit the Time with push button. How can i do that?

  • @acmgj8536
    @acmgj8536 7 ปีที่แล้ว

    you are making great ... I love you project s ... but still it seems little bit hard for me as beginner .

  • @gregorR36
    @gregorR36 8 ปีที่แล้ว

    think about exercising dht22
    or 18b20
    great movies

  • @Dancopymus
    @Dancopymus 8 ปีที่แล้ว

    Hi friend! My screen is a TFT 2.2" ILI9341; I took your code but is presenting flicker (flashing) on the screen and is not showing the time; you can help me? Thank you

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      In order the project to work you need to use the 1.8" display I use.

  • @MPElectronique
    @MPElectronique 9 ปีที่แล้ว

    Hi. I'm building a RTC with DS3231, and i want to change the weekday, hour, minute, second, day and year... and i'm wonder how with this library?
    can you help me?
    Thank you so much!
    Marc.

    • @Educ8s
      @Educ8s  9 ปีที่แล้ว

      +Marc Paradis There is a function in the code which is name setTime. There you can change the time and the date easily.

  • @steve8939123
    @steve8939123 8 ปีที่แล้ว

    hello again, I tried the switch case, but it didn't work I think because the hours is a string.
    String hours = String(now.hour());
    int(hours);
    switch(hours)
    {
    case 13:hours=1;break;
    case 14:hours=2;break;
    case 15:hours=3;break;
    case 16:hours=4;break;
    case 17:hours=5;break;
    case 18:hours=6;break;
    case 19:hours=7;break;
    case 20:hours=8;break;
    case 21:hours=9;break;
    case 22:hours=10;break;
    case 23:hours=11;break;
    case 24:hours=12;break;
    }
    }
    if(now.minute()

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      +Steve Tripoli Yes, I just gave you the idea, not a working code. You can create another int variable for hour, use it for the switch - case and the convert it to a string in order to print it.

  • @mdafroz4190
    @mdafroz4190 8 ปีที่แล้ว

    sir can you make a video about how we can program for this displats as we want

  • @harshityashwardhan
    @harshityashwardhan 6 ปีที่แล้ว

    Hey need ur help can we add a realy so when the temperature reach a set limits it turn on the fan ....

  • @tzmijevski
    @tzmijevski 8 ปีที่แล้ว +1

    Nick, sorry to bother you... I am not expert in Arduino, but I have build many of your projects.
    That was the first time I got a compilation error. I believe it is a simple definition mater, but I was not able to solve it. Do you have a clue, please? Thanks a lot.
    RTCTFT160.ino: In function ‘void loop()’:
    RTCTFT160.ino:81:52: error: call of overloaded ‘String(float&, int)’ is ambiguous
    RTCTFT160.ino:81:52: note: candidates are:
    In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:192:0,
    from /home/tzmijevski/sketchbook/libraries/Adafruit_ST7735/Adafruit_ST7735.h:28,
    from RTCTFT160.ino:1:
    /usr/share/arduino/hardware/arduino/cores/arduino/WString.h:70:11: note: String::String(long unsigned int, unsigned char)
    explicit String(unsigned long, unsigned char base=10);
    ^
    /usr/share/arduino/hardware/arduino/cores/arduino/WString.h:69:11: note: String::String(long int, unsigned char)
    explicit String(long, unsigned char base=10);
    ^
    /usr/share/arduino/hardware/arduino/cores/arduino/WString.h:68:11: note: String::String(unsigned int, unsigned char)
    explicit String(unsigned int, unsigned char base=10);
    ^
    /usr/share/arduino/hardware/arduino/cores/arduino/WString.h:67:11: note: String::String(int, unsigned char)
    explicit String(int, unsigned char base=10);
    ^
    /usr/share/arduino/hardware/arduino/cores/arduino/WString.h:66:11: note: String::String(unsigned char, unsigned char)
    explicit String(unsigned char, unsigned char base=10);
    ^

    • @hgjfbzfnombre9678
      @hgjfbzfnombre9678 8 ปีที่แล้ว

      +Thiago Rodrigo Lóss Zmijevski I have the same problem

    • @tzmijevski
      @tzmijevski 8 ปีที่แล้ว

      +Hgjfbz F nombre
      It does work under the Windows version of the IDE.

    • @tzmijevski
      @tzmijevski 8 ปีที่แล้ว

      +Hgjfbz F nombre
      After updating the IDE to the latest version (1.6.8) it did work under Ubuntu as well!!!

  • @steve8939123
    @steve8939123 8 ปีที่แล้ว

    Hello, I built this project and it works great, but I tried everything I know of, which isn't much, to change it from 24 hour clock to 12 hour clock with no success. Can you help me figure how to change it to 12 hour.
    Thanks,
    Steve

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      +Steve Tripoli Hi Steve, try a switch case. For example:
      switch(hour)
      {
      case 13: hour = 1; break;
      case 14:hour=2;break;
      .
      .
      .
      }

  • @JoeDplummer_
    @JoeDplummer_ 8 ปีที่แล้ว

    Great! RTC project very fun to build. Works and looks very good !
    Thank you!

  • @steve8939123
    @steve8939123 8 ปีที่แล้ว

    Hello, great project thanks for sharing. I didn't hear what you said about how to connect the 1.8 TFT display, could you tell me where to look for the connections.
    Thanks,
    Steve

  • @nutcake28
    @nutcake28 7 ปีที่แล้ว

    Hi!
    So I run the code and everything works just fine. However my LCD gets a black screen and stops there. Do you know what could be the problem? Thanks!

    • @nutcake28
      @nutcake28 7 ปีที่แล้ว

      Ok, so I just plugged the sd card on the back and it worked fine lol see if that's the problem

  • @tumenbayarmunkhjargal6677
    @tumenbayarmunkhjargal6677 4 ปีที่แล้ว

    How about touch screen function? what do i do ?

  • @andresguerrero8298
    @andresguerrero8298 6 ปีที่แล้ว

    thanks for the project and keep going greetings from mexico.

  • @steve8939123
    @steve8939123 8 ปีที่แล้ว

    Never mind I found your video on connecting and using the 1.8 TFT display.

  • @art50red20
    @art50red20 4 ปีที่แล้ว

    thanks for the information. Question: how to make seconds?

  • @raybright5805
    @raybright5805 8 ปีที่แล้ว

    would be great to use the TFT on your previous data logger as well as the usual storage to SD card.

  • @WayneRigley
    @WayneRigley 5 ปีที่แล้ว

    would be perfect if this had a SD card ready so the data could be pulled off of it, im trying to get one of these for my wife for her class room..

    • @WayneRigley
      @WayneRigley 5 ปีที่แล้ว

      Wait the st7735 has a SD card slot on the back, can this be used for data logging or is it intended for the display?

    • @Educ8s
      @Educ8s  5 ปีที่แล้ว

      Sure, we can use the SD card at the back for data logging.

  • @pedrolobo9758
    @pedrolobo9758 9 ปีที่แล้ว

    Great job! I build something like it but with a nokia display :)

  • @泰来-e2t
    @泰来-e2t 4 ปีที่แล้ว

    Thanks Nick, learn much from you!

  • @diegoalejandroconfalonieri
    @diegoalejandroconfalonieri 9 ปีที่แล้ว

    con alarma despertador ?? con sumvador ,,gracias

  • @epicelectronicahernandez8961
    @epicelectronicahernandez8961 8 ปีที่แล้ว

    hi could make this clock witch alarms? very good video.

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      +EPICELECTRONICA HERNANDEZ yes we can do that

  • @sidneij.becker2098
    @sidneij.becker2098 8 ปีที่แล้ว

    hello, love watching your videos, already much learned, I set some of his projects, the latter was that the RTC, but he lags mine, in two days it ta 5 late seconds jo rode several other RTC, other codes but all delays, tems an opinion.

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      Have you tried another module? Maybe you got a faulty one.

  • @MrBobWareham
    @MrBobWareham 8 ปีที่แล้ว

    Love this project but would like to add a menu to it so it becomes an alarm clock for my bedside table.
    Will it be easy to add a menu to add arm time ?
    Thank you for any help Bob

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      It is not that difficult to add such functionality. I will try it someday.

  • @noobiangr2635
    @noobiangr2635 ปีที่แล้ว

    ωραίος!

  • @amarsharma2896
    @amarsharma2896 6 ปีที่แล้ว

    Can we use noKia 5110 display

  • @aldrins1922
    @aldrins1922 6 ปีที่แล้ว

    I've made it! Thanks for the nice tutorial.

  • @dartfrogdk
    @dartfrogdk 9 ปีที่แล้ว

    can you explain a little about setting the rtc, when i do it it sets to 27.08.2015 at 9.35 every time?

    • @Educ8s
      @Educ8s  9 ปีที่แล้ว

      +Poulsen Media™ You have to manually set the current time in the code.
      Change this line of code: DateTime dt(2015, 8, 27, 9, 35, 30, 4); // Year, Month, Day, Hour, Minutes, Seconds, Day of Week

    • @dartfrogdk
      @dartfrogdk 9 ปีที่แล้ว

      +Educ8s.com Sorry i missed that one, thank you

  • @joachimlange4883
    @joachimlange4883 9 ปีที่แล้ว

    Hey, nice project. I am looking for a posibility to set the time via menu and buttons. Any idea how to do this. Maybe this could be a feature for your next version of the clock

    • @Educ8s
      @Educ8s  9 ปีที่แล้ว

      +Joachim Lange Yes, I plan to make a special video on that!

    • @joachimlange989
      @joachimlange989 9 ปีที่แล้ว

      +educ8s.tv i have found an intersting Link for this issue: liudr.wordpress.com/libraries/phi_prompt/

  • @tamassarvari4539
    @tamassarvari4539 8 ปีที่แล้ว

    where the MOSI pin on TFT?

  • @IanHughes17
    @IanHughes17 8 ปีที่แล้ว

    Finally managed to complete the clock after a few months, thanks for your videos which help tremendously. My display is very dim is it the part or connection?

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      +Ian Hughes Check your connections again, and if there is no mistake at the connections try another display.

    • @IanHughes17
      @IanHughes17 8 ปีที่แล้ว

      I will have to get another display to try, but thanks for the reply. Keep up the good work.

  • @markgreco1962
    @markgreco1962 9 ปีที่แล้ว

    You do a nice job is wind direction next?

  • @yoihenbalairen8639
    @yoihenbalairen8639 5 ปีที่แล้ว

    Please circuit diagram

  • @markgreco1962
    @markgreco1962 9 ปีที่แล้ว

    You do a nice job is wind direction next?

  • @steve8939123
    @steve8939123 8 ปีที่แล้ว

    thanks for the idea and help, it's working correctly now, I am happy.

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      +Steve Tripoli I glad that it helped!

    • @b9robot01
      @b9robot01 7 ปีที่แล้ว

      Hello Steve I have been trying for over a hour to get mine to be a 12 hour clock, could you help me since it sounds like you actually got yours to work.

  • @ProjectGuns
    @ProjectGuns 9 ปีที่แล้ว

    Great videos, I have learned a lot from them. How about a video on some of the larger TFT displays that are also available.
    Thanks for all your hard work!!

    • @Educ8s
      @Educ8s  9 ปีที่แล้ว +1

      +ProjectGuns Yes, we are going to test the larger TFTs as well. Stay tuned!

    • @glynnhm0lsg308
      @glynnhm0lsg308 9 ปีที่แล้ว

      Would like to put my 2.4 TFT on this project

  • @travisthomason191
    @travisthomason191 7 ปีที่แล้ว

    Your my favorite human.

  • @MPElectronique
    @MPElectronique 9 ปีที่แล้ว

    Educs, i would like to edit the Time with push button. How can i do that?

    • @Educ8s
      @Educ8s  9 ปีที่แล้ว +1

      +Marc Paradis That's more complicated. I will prepare a video on that.

    • @paulomalas76
      @paulomalas76 8 ปีที่แล้ว

      +educ8s.tv ,
      br-arduino.org/2015/09/arduino-interrupcoes-relogio.html

    • @paulomalas76
      @paulomalas76 8 ปีที่แล้ว

      +Marc Paradis br-arduino.org/2015/09/arduino-interrupcoes-relogio.html

  • @manelangulo8352
    @manelangulo8352 9 ปีที่แล้ว +1

    Hola. he realizado el montaje y funciona correctamente, pero cuando saco la alimentación el reloj vuelve a la hora que lo inicie. Me puede indicar como puede mantener la hora al perder la alimentación.
    Un saludo
    Gracias

    • @Educ8s
      @Educ8s  9 ปีที่แล้ว

      +Manel Angulo You have to comment the line of code that sets the time else it will always set the time each time the Arduino starts. That line of code has to run only once.

    • @manelangulo8352
      @manelangulo8352 9 ปีที่แล้ว

      + Educ8s.com OK SOLUCIONADO, muchísimas gracias por su atención y pronta respuesta.
      Soy un entusiasta seguidor de sus vídeos. Usted puede incluir en este programa con sensores de Humedad y Presión Atmosférica y editarlo.
      Me agradaría poder experimentar con ello y tenerlo montado.
      Gracias
      Un saludo

    • @Educ8s
      @Educ8s  9 ปีที่แล้ว

      +Manel Angu Si, voy a hacerlo pronto! Saludos desde Grecia!

    • @manelangulo8352
      @manelangulo8352 9 ปีที่แล้ว

      +Educ8s.com Gracias lo espero con impaciencia
      Un saludo

    • @diegoalejandroconfalonieri
      @diegoalejandroconfalonieri 9 ปีที่แล้ว

      +Manel Angulo ,,como lo resolviste ? a mi me pasaba con el LCD de 16x2 y luego me di cuenta que al poner en hora no ponia las // delante de los comandos ,,tambien el tema es desconecta los 5v del reloj ,,antes de desconectar el cable de la compu,,gracias

  • @steve8939123
    @steve8939123 8 ปีที่แล้ว

    thanks, I will try that.

  • @jerrylin5081
    @jerrylin5081 6 ปีที่แล้ว

    hi, the link for code seems not found

    • @Educ8s
      @Educ8s  6 ปีที่แล้ว

      Sorry for that. It is now fixed! Cheers!

  • @Flawake
    @Flawake 6 ปีที่แล้ว

    i have exit status 1 error

  • @epicelectronicahernandez8961
    @epicelectronicahernandez8961 8 ปีที่แล้ว

    DONDE ENCONTRAR LA BIBLIOTECA SODAQ_ds3231?

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      github.com/SodaqMoja/Sodaq_DS3231

    • @epicelectronicahernandez8961
      @epicelectronicahernandez8961 8 ปีที่แล้ว

      FUNCIONO BIEN LA COMPILACIÓN SOLO EL SENSOR DE TEMPERATURA QUEDO FUERA DE LO NORMAL POR LO DEL CÓDIGO QUEDO EXCELENTE LO FELICITO Y MUCHAS GRACIAS,
      HAY ALGUNA FORMA DE CALIBRAR EL TERMÓMETRO?
      EXCELENTE BUEN VIDEO

  • @thesilentsapo
    @thesilentsapo 9 ปีที่แล้ว

    great thanks

  • @lilly0079
    @lilly0079 8 ปีที่แล้ว

    I like your project

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว

      Thank you!

  • @tomgray7049
    @tomgray7049 7 ปีที่แล้ว

    Can this be on 12hr mode?

    • @Educ8s
      @Educ8s  7 ปีที่แล้ว +1

      Yes of course!

    • @hairlesshippy
      @hairlesshippy 7 ปีที่แล้ว

      actually, I am not sure it can be 12hr mode.
      per sodaq_ds3231.h in library line 65
      "// Only 24 Hour time format is supported in this implementation"
      I would LOVE to have this display in 12 hour mode but just not experienced enough to create a work-around..
      thinking there is a simple conversion that can be made prior to output that would work..
      please help if you have some time to look at it again.

  • @MPElectronique
    @MPElectronique 9 ปีที่แล้ว

    Thank you

  • @maxwellmoojw8544
    @maxwellmoojw8544 9 ปีที่แล้ว

    great

    • @Educ8s
      @Educ8s  9 ปีที่แล้ว

      +Maxwell Moojw Thanks!