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

Поделиться
HTML-код
  • Опубликовано: 2 окт 2015
  • 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/arduino-real-time-cl...
    Want to learn to code?
    👨‍💻 Check my new RUclips channel: bit.ly/3tku2n0
  • НаукаНаука

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

  • @JoeDplummer_
    @JoeDplummer_ 8 лет назад

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

  • @aldrins1922
    @aldrins1922 6 лет назад

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

  • @user-ci1pr9gb2h
    @user-ci1pr9gb2h 4 года назад

    Thanks Nick, learn much from you!

  • @steve8939123
    @steve8939123 8 лет назад

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

  • @andresguerrero8298
    @andresguerrero8298 6 лет назад

    thanks for the project and keep going greetings from mexico.

  • @travisthomason191
    @travisthomason191 7 лет назад

    Your my favorite human.

  • @pedrolobo9758
    @pedrolobo9758 8 лет назад

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

  • @steve8939123
    @steve8939123 8 лет назад

    thanks, I will try that.

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

  • @viisteist1363
    @viisteist1363 6 лет назад +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...?

  • @ProjectGuns
    @ProjectGuns 8 лет назад

    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  8 лет назад +1

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

    • @glynnhm0lsg308
      @glynnhm0lsg308 8 лет назад

      Would like to put my 2.4 TFT on this project

  • @MPElectronique
    @MPElectronique 8 лет назад

    Thank you

  • @acmgj8536
    @acmgj8536 7 лет назад

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

  • @lilly0079
    @lilly0079 8 лет назад

    I like your project

    • @Educ8s
      @Educ8s  8 лет назад

      Thank you!

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

    ωραίος!

  • @thesilentsapo
    @thesilentsapo 8 лет назад

    great thanks

  • @raybright5805
    @raybright5805 8 лет назад

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

  • @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

  • @markgreco1962
    @markgreco1962 8 лет назад

    You do a nice job is wind direction next?

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

  • @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!

  • @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 ?

  • @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?

  • @nielslarsen1094
    @nielslarsen1094 7 лет назад

    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

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

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

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

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

  • @diegoalejandroconfalonieri
    @diegoalejandroconfalonieri 8 лет назад

    con alarma despertador ?? con sumvador ,,gracias

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

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

  • @DogRox
    @DogRox 8 лет назад +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  8 лет назад +1

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

    • @DogRox
      @DogRox 8 лет назад

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

  • @gregorR36
    @gregorR36 8 лет назад

    think about exercising dht22
    or 18b20
    great movies

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

  • @MrBobWareham
    @MrBobWareham 7 лет назад

    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  7 лет назад

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

  • @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

  • @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

  • @MPElectronique
    @MPElectronique 8 лет назад

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

  • @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

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

  • @mdafroz4190
    @mdafroz4190 8 лет назад

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

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

  • @amarsharma2896
    @amarsharma2896 6 лет назад

    Can we use noKia 5110 display

  • @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

  • @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 ?

  • @viisteist1363
    @viisteist1363 6 лет назад +1

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

    • @viisteist1363
      @viisteist1363 6 лет назад

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

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

  • @MPElectronique
    @MPElectronique 8 лет назад

    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  8 лет назад

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

  • @viisteist1363
    @viisteist1363 6 лет назад +2

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

  • @dartfrogdk
    @dartfrogdk 8 лет назад

    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  8 лет назад

      +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 8 лет назад

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

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

  • @joachimlange4883
    @joachimlange4883 8 лет назад

    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  8 лет назад

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

    • @joachimlange989
      @joachimlange989 8 лет назад

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

  • @papurceviv
    @papurceviv 7 лет назад

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

  • @grahambrown9409
    @grahambrown9409 Месяц назад

    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?

  • @epicelectronicahernandez8961
    @epicelectronicahernandez8961 8 лет назад

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

    • @Educ8s
      @Educ8s  8 лет назад

      +EPICELECTRONICA HERNANDEZ yes we can do that

  • @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!!!

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

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

  • @maxwellmoojw8544
    @maxwellmoojw8544 8 лет назад

    great

    • @Educ8s
      @Educ8s  8 лет назад

      +Maxwell Moojw Thanks!

  • @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~

  • @Dancopymus
    @Dancopymus 7 лет назад

    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  7 лет назад

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

  • @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;
      .
      .
      .
      }

  • @tamassarvari4539
    @tamassarvari4539 7 лет назад

    where the MOSI pin on TFT?

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

  • @manelangulo8352
    @manelangulo8352 8 лет назад +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  8 лет назад

      +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 8 лет назад

      + 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  8 лет назад

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

    • @manelangulo8352
      @manelangulo8352 8 лет назад

      +Educ8s.com Gracias lo espero con impaciencia
      Un saludo

    • @diegoalejandroconfalonieri
      @diegoalejandroconfalonieri 8 лет назад

      +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

  • @michieldirks
    @michieldirks 6 лет назад

    i have exit status 1 error

  • @jerrylin5081
    @jerrylin5081 6 лет назад

    hi, the link for code seems not found

    • @Educ8s
      @Educ8s  6 лет назад

      Sorry for that. It is now fixed! Cheers!

  • @epicelectronicahernandez8961
    @epicelectronicahernandez8961 7 лет назад

    DONDE ENCONTRAR LA BIBLIOTECA SODAQ_ds3231?

    • @Educ8s
      @Educ8s  7 лет назад

      github.com/SodaqMoja/Sodaq_DS3231

    • @epicelectronicahernandez8961
      @epicelectronicahernandez8961 7 лет назад

      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

  • @yoihenbalairen8639
    @yoihenbalairen8639 5 лет назад

    Please circuit diagram

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

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

  • @markgreco1962
    @markgreco1962 8 лет назад

    You do a nice job is wind direction next?

  • @MPElectronique
    @MPElectronique 8 лет назад

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

    • @Educ8s
      @Educ8s  8 лет назад +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