TTGO T-Display ( ESP32 ) - Internet Weather Station and Clock (tutorial)
Вставка
- Опубліковано 12 гру 2020
- Follow me on Instagram / volosprojects
Hello! In this video I will show You how making Weather station using ESP32 board, I am using TTGO T-Display board but you can use any Esp32 development board. All data are fetched from the internet, for the weather openweathermap API is used. Feel free to download code for Arduino IDE .
SUBSCRIBE HERE:
/ @volosprojects
You can buy TTGO T-Display here:
www.banggood.com/custlink/mvm...
You can also buy me a coffe at:
ko-fi.com/volosprojects
Here is code:
github.com/VolosR/TTGOWeather...
My other ttgo Display videos:
Space shooter game • TTGO T Display (ESP32)...
Brakeout game: • TTGO T-Display Board (...
ANIMATIONS : • Making animation from ...
Black Friday Deals 2021 bit.ly/3wGaMk7
CLEARANCE sales bit.ly/3DbNlRU
Auto & Moto,Tools & Electronics sales bit.ly/3c2MEOW
Big Brands New Arrival bit.ly/3qxSAbc
Crazy Coupon Deals & Best Offers bit.ly/30gtTFG
#esp32, #ttgodISPLAY, #TTGO, #Arduino
#TTGOTDisplay, #WeatherStation, #ESP32WeatherStation - Наука та технологія
If you want support this chanell you can buy me coffe here :) : ko-fi.com/volosprojects
This is GREAT! If anyone wants to display the temperature in Fahrenheit instead of Celcius, it's pretty easy. In the string endpoint variable, change "units=metric" to "units=imperial" and in the line tft.println(tmp.substring(0,3)) change it to tft.println(tmp.substring(0,4)) and it will display the temperature in Fahrenheit.
Thank you, i forgot that lots off people dont use c
Yes, I and can confirm it does work in fehrenheit. If your having trouble finding the lines bobBailey mentioned, go to edit in arduino window and down to 'find' and search for it that way and you will find it quickly and replace as he suggested. good tip Bobbailey. great project VOLOS
Figured that out. I set one up again today because, well because I wanted one to do that again. It is cool, my daughter is sitting here asking me why I would want this because my cell phone does the same thing for free. She needs to sit and watch as I write out the check to pay for those "free" cell phones we all have anchored to our eyes 24X7 in todays upside down world. Still it is indeed cool, think I will mount one in a small case for daily use..
Such a beautiful interface design, the font and animation look great !
Great Project! Glad I found your channel, it's much easier to get started with real projects from solidly commented examples.
Thank you, i am glad you like it
I tried out this program and after a few tweaks, it worked very well.
Volos I’m so glad I found your channel!! You got me interested in the TTGO boards and I just ordered some from your link. Can’t wait to get them!
Thanks for the great videos!!! Keep it up 👍
Than you Ben, I am very happy when I see comments like this. I hope you TTGO will arive soon. :)
Awesome work buddy! The animation gif is simply perfect. Worked with my new TTGO T-Display. Thanks for sharing your codes.
Cool project. I got it to work after a bit of fiddling with libraries. Somehow, the ArduinoJson library that got installed wasn't the most current version. After updating, it worked fine. My "town" name was too long to fit the display, so I just hard coded it to the ICAO airport identifier here. I also found my town name is shared by several others in the US, so I changed the API call to use the town id number instead. Also changed the units to “imperial” because that’s the crazy system we use here.
Great video - watched all the way to the end. Please do continue to share things like this.
Thank xou man ,i will try
You're making some fantastic projects lately, Volos! (Dan from the Arduino facebook group).
Thank you😃
Your channel is so interesting, Just follow your vid on the weather station, works great, thank you
Great project and very well explained! Thank you!
Great project Velos, I have mine working very well - thanks for your excellent video! Gary from Perth West Australia.
Glad to hear that. 😃
Cool project! Ive tried to make something similar on 1306 display, but colored animation looks much greater! By the way, Openweather is capable to give you a bit more data. You can obtain stringed data by using GPS coordinates (actual if you are moving across the country, just to get weather info in current location). Also forecast for several days ahead. Day of week, moon phase etc.....
And if you connect GPS module - than you can load current time from GPS even if there is no internet connection. Also GPS will give you ability to : 1) get current position (and save it if needed). 2) estimate range between current point and selected (or preset) points 3) determine direction to the selected (saved) point. 4) Estimate your actual movement speed.
I just tuned up small project with small oled display and Wemos8266, there are 2 buttons too. So, would be nice to try convert it for TTGO display.
Very cool project. Only issue I had was with the ani.h file. The issue was that when I saved the program this file was not in the same folder. Moved the file into the folder and presto it worked. Also was able to make additional modifications reading the comments. Great little project. Look forward to your new series on programing.
Me ha gustado mucho el proyecto, queda muy bien en esta pequeña pantalla, he tenido que corregir un par de cosas, al igual que pasaba con "Alien Attack" el fichero ani.h estaba en formato UTF-8 BOM solo lo guardè como UTF-8 y funciona, muchas gracias por tu trabajo.
Thnks it helped me
Great one mate ! Gotta try it out soon
Awesome video! I'm very confused about the TTGO, and there are not many resources online and it's not easy to assemble your own code using examples. Can you maybe make a series of tutorials for TTGO?
This video should get millions of likes.
Thank you
Buy it here www.banggood.com/custlink/G3vyVAS3RG
What type of usb port does TTGO has, usb c type or micro usb?
@@highjack2778 It's a Type C.
Thanks, I subscribed and purchased one to play around... :)
Excellent video! And I love the animation! Subscribed :)
Thank you
Super cool! tyvm! I have a remote camera enclosure installation for taking nature photos. It must be autonomous for weeks/indefinitely. It has a solar panel, Renogy solar charge controller, 12V lithium battery powering a digital temperature controller and 12V heat strips around my glass window. I need to calculate the exact dew point and then control heat strips that will ALWAYS 24/7/365 keep my glass window heated to, for example, 5 degrees above the dew point it has calculated. My heat strips use ~35W. My temperature controller works great, but only reads the temperature of my glass window. To make my battery last as long as possible, I only want my heat strips to be able to operate when there is a chance of dew forming on the glass window. If there is no chance of dew, I want to save the battery and allow the solar to put all energy into the battery. I have a Lilygo T-Display S3 ESP32-S3 touch screen. I got it to use to calculate the dew point, but I do not then know how to make it control the heat strips. My temp controller comes would wake up & control it's relay, or I could use a standalone relay if the Lilygo could make the digital temp controller that I am currently using redundant. I need to use the least power hungry system, if another entire set up would do what I need please tell me & I will order that exactly. Must be streamlined & easy to use, because I will be handing this all off to someone else to set up & operate. Thank you very much!!
Great job. Copy->Paste->works. Thanks
You are awesome for sharing this. Thank you, it works and I like the animation :D
Thank you
Nice project dudu, thanks for share 👍
I finally got this to work. It is still a big crude but functional. I am not the author.
Most importantly Change the update frequency or OWM will knock you off their system. It updates every couple of minutes. That's too often! Make the line that compares count to 2000 be like this:
if (count > 40000) count = 0; That will update about every hour. I will try to fix this better, soon.
Fix the first line of ani.h to say int and turn green. Of course fix your SSID/PW and OWM pass code. Get the different NTP client library. There are a couple of other problems that I am trying to figure out but it is working now.
You made my day! Thanks for sharing your changes!
Fix the first line of ani.h to say int and turn green. (mine shows "int frams=10;" and I am getting error '\357 in program) anyone know a fix for this?
@@MaxJupiter Read what I said and do it.
@@michealmorrow1481 Sorry, but I don't understand either what that's about.
The first line in ani.h originally is indeed "int frames=10;" replacing it with "int turn green;" (as you said) results in an error:
**********************************************
" In file included from C:\Users\Frank\Documents\Arduino\TTGOWeatherStation-main\Weather\Weather.ino:3:
C:\Users\Frank\Documents\Arduino\TTGOWeatherStation-main\Weather\ani.h:1:10: error: expected initializer before 'green'
int turn green;
^~~~~
Multiple libraries were found for "ArduinoJson.h"
Used: C:\Users\Frank\Documents\Arduino\libraries\ArduinoJson
Not used: C:\Users\Frank\Documents\Arduino\libraries\Old_ArduinoJson
Multiple libraries were found for "NTPClient.h"
Used: C:\Users\Frank\Documents\Arduino\libraries\NTPClient
Not used: C:\Users\Frank\Documents\Arduino\libraries\Old_NTPClient
Not used: C:\Users\Frank\Documents\Arduino\libraries\Old_NTPClient2
exit status 1
Compilation error: expected initializer before 'green'"
*********************************************************
Replacing it with "int and turn green;" (again as you said), returns following error:
*********************************************************
"In file included from C:\Users\Frank\Documents\Arduino\TTGOWeatherStation-main\Weather\Weather.ino:3:
C:\Users\Frank\Documents\Arduino\TTGOWeatherStation-main\Weather\ani.h:1:14: error: expected initializer before 'green'
int and turn green;
^~~~~
Multiple libraries were found for "ArduinoJson.h"
Used: C:\Users\Frank\Documents\Arduino\libraries\ArduinoJson
Not used: C:\Users\Frank\Documents\Arduino\libraries\Old_ArduinoJson
Multiple libraries were found for "NTPClient.h"
Used: C:\Users\Frank\Documents\Arduino\libraries\NTPClient
Not used: C:\Users\Frank\Documents\Arduino\libraries\Old_NTPClient
Not used: C:\Users\Frank\Documents\Arduino\libraries\Old_NTPClient2
exit status 1
Compilation error: expected initializer before 'green'"
***********************************************************
I'm not speaking for MaxJupiter, but, I for one, haven't the foggiest what you mean.
Please clarify.
BTW as it is, my TTGO will run the program, kind of. It will connect, won't show date and time, shows location and IP address, needs a few seconds to load temperature and humidity, and promptly reboots.And keeps looping like that.
@@2flying4fun just replace "int". It will turn green.
Very cool project! Thank you!
Another great demo - I got it to work. How about a CPU / RAM / System Resources monitor project for TTGO. Then I could glue this thing to the front of my pc. THANKS again, These are good demos.
Thanks! Great project.
Nice video. Great little project. Mahalo for sharing! : ) 🐒
Very well explained
Great project, love this little board! Had a little trouble getting it running (NTP client mix up) but works like a charm. I use a discarded E-cigarette battery (rechargeable 3.7v Lipo battery to run it) but would be nice to see a battery level on the bottom of the screen to replace the IP address . Would you be able to do a video how to access and display battery voltage?
Thanks again!
Nice implementation. Thanks for share. I did a small PR for build it also with PlatformIO. Thanks Volos Again. Greetings from Berlin.
Thank you, i need to try PlatformIO
@@VolosProjects you could be try it in the last "pull request" that I did to your Github repo :)
github.com/VolosR/TTGOWeatherStation/pull/1
tft.println(tmp.substring(0,5));
this is at line 178, the original values was 0,3 and like that it didn't display the decimal numbers
anyway it's a very good work.
my regards.
Great video! keep doing video like this
Great job, great project! Keep it up and I will continue to follow! +1 Subscriber
Nice video. I will try it out on my ttgo board I have lying around. Maybe this is also nice on the ttgo watch!
It will work with little code modification, but ttgo watch with wifi turned on will drain battery fast.
I also have the TTGO watch 2020 ver.1 I surely would be awesome to have this sketch running on it.
Great video!
Great Project!
Subbed going to do this! Thankyou.
thank you Walter
Awesome Work..
Nice project
result looks amazing :) animation is cool of course... can you please share which battery are you using there and if it's rechargeable via board usb port or if you must disconnect it for charging?
Great project. Everything worked as described when using the recommended libraries. How would I change the date/time format for US?
Thanks. Nice project. +1 sub
Really cool project!
thank you :)
Nice project as always! Thank You. What I do not like is impossible to find location, time zone and etc automaticaly. It makes this portable weather station useless: everything , including wifi credentials are hard codding, so if you take this unit to your country house it will show blanc screen, because you even can not connected with your internet.
Otherwise as I said, as a example of how to program and UI design is good.
My clock & weather station is much simpler. It displays current values on small OLED screen, but in my opinion projects like these can save lot of energy by turning off screen when no one is around. Hence simple idea of using small arduino PIR sensor to turn on and off the display. It's interesting that probably no such product uses this kind of energy saving solution.
Good Job. I tested it , It works perfectly. But how can we add Temp Sensor and RTC with it instead of depending upon internet ?
Great as usual. I used your animation program and I display 2 animated gifs (btc and eth rotating ) and the values
Thank you, glad you like it.
Has anyone tried this lately? Mine loads fine but freezes up instantly. I have had to change the argument "getformmatted Date" to "getformmatedTime" in order for it to compile, and I think that has something to do with it. Volos, just love your channel, I could listen to you speak for days - your voice is so relaxing. Just love the content - keep 'em coming man, they're terrific!
i did the same thing and have the same problem , if you fined a way to fix this let me know
Same thing here ... whole day trying to figure it out also while compiling it found thet at row 59 ledcAttachPin(TFT_BL, pwmLedChannelTFT); the TFT_BL was not declared in the scope.
Did it work after you fixed this issue
nice tube!
very. very. nice.
Thank you for sharing your project and code, I have an ESP32 and a 1.8" ST7735 display, so my question is how hard is it to change your code for my hardware? Thank you, Bob in the UK
great boardw, how about GPS navigation, would be very useful for day to day traveling.
Thank you so much for sharing your knowledge and code. It looks like that display is a color OLED, and not a LCD?
That’s actually an IPS LCD, not an OLED. Those little displays have improved dramatically over the past few years.
Thx, your project became base for my ttgo display projects but how did you make ani.h? :)
I found your other video explaining how to, watching it now.
Very interesting project. I have one project that makes the board and the display to be working all the time. I know how to switch-off the display when I want, but not how to swicht it on once I has been switched-off. Can you help me to switch on/off the dispaly keeping the board working?
Great job. Got my TTGO few days ago. I'm new to ESP32 programming and like your projects! I also had issue with ani.h - I could fix that. I now have the issue that after short time the display freezes. no animation, so secs are counted, buttons do not react. any idea?
Making the radar map display would be amazing... (hint hint)
Nice
can i set up a second wifi access point eg my main wifi access point my home router and the second my mobile hotspot in case i am out of home
Thanks for interesting video. Maybe someone know wether services without registration? Or find location through Internet without registration.
hello you are making great codes. I have a request if you could add to the code so that it does not hang after 6 minutes and that it refreshes every 30 minutes in advance, thanks in advance
Hi . It is very good project. How can I add LCD on off button to the code ???
great post man , i am new to this and i bought 2 of the TTGO boards from amazon and tried your code nothing work screen went blank and even when i unplug it and repower it up nothing but the little blue led.
you need to install it properly and edit tft_espi library
How can i install it on Lilygo t-pico c3?
Great project, thanks for sharing. I tried it, it runs but it never connects to the WiFi network, I double checked ssid/password and tried with 2 different networks. Any ideas?
Never mind, I was trying to connect to 5G Wifi, switched to 2.4G and worked perfectly
but is possible connect it to an PEAP network ? using the example I get IP but nor http connecton anyway
Very nice.
You can do the same for the m5stickc?
I was hoping you would get a response. I have the M5Stick C Plus and tried to implement this sketch on it and got just errors. I did include the M5Stick libraries in the sketch, but still got some errors of missing files, etc. Downloaded all files needed as recommended, no joy. :(
VERY NICE PROJECT.
Thank you
Please help me, when I'm loading to my TTGO whole screen is shift it to left and to the up, How I can fix this ? Thank you again
it would be great to connect a weather station and internet radio in one project
Is there a way to make the time display in 12H format?
Many thanks for all your great videos!!
I have the Weather station working, except for the animation.
When compiling I get this error.
ani was not declared in this scope
tft.pushImage(0 , 88, 135, 65, ani
The ani file has been extracted, and is in the correct folder
Please can you help
very nice! I tried this and after fiddling with libraries and updating the right user setup file, it works, but as someone earlier noted, whole screen is shift it to left and to the up, anything am missing, kindly help, thank you.
Ok, after some more checking, it's a RTFM issue :), the user setup select header file must have only one #include uncommented, so comment out the default and uncomment the #include , it now works like a charm, thank you!!!
I KNOW WHAT THIS IS GOOD FOR.
How to correct timezone in the code and data format? Thank you.
Hello 'Volos Projects', I really liked your project! However, I have a few questions:
I tried it with a 2.2 inch ILI9341 Display, however logically it is not filling the screen fully and correctly, as it is a larger display than the "TTGO T-Display" you use in the video.
I know the TFT_eSPI library is great but I'm not familiar with it. I would like to know how to adapt your sketch correctly to my display or perhaps with a larger display like a 2.8 inch ILI9341. For that, logically, all fonts would have to be bigger, to fill the screen, which is bigger.
I don't understand one thing: do you use the font "Orbitron_Medium_20" as the only font in your code? Is it scalable?
For example, if I want to enlarge the font which is used to show Time, Date, City Name, TEMP, IP address (in the lower left corner of the screen), how should I do it?
Another thing: where do you change the Date formatting, for example, Day, Month and Year?
Sorry for so many questions, but I would love to use your code with a larger display.
My early thanks and Greetings from Brazil,
Daniel Fernandes
/***************************************************************************************
** Function name: setTextSize
** Description: Set the text size multiplier
***************************************************************************************/
void TFT_eSPI::setTextSize(uint8_t s)
{
if (s>7) s = 7; // Limit the maximum size multiplier so byte variables can be used for rendering
textsize = (s > 0) ? s : 1; // Don't allow font size 0
}
Hi Oscar, but what are these instructions for? Thanks
Hi, congratulations for this project!
What UserSetup___.h file do you use? After loading the sketch absolutely nothing happens?
Coul be this configuration as nothing is mentioned about it?
Thanks
Please check this video, here i explained how to setup ttgo display board.
Hi how to flash a text on tft espi ( not using delays or millis )? I want to flash warning text on my project. 😀
Can you do tutorial on new ttgo esp32-c3?
works fine with 1.3' tft, but 1/2 blank
Can you do a video showing how to set it so it can show special characters like ç and õ?
oki grazie ( ; = ))
Love the little weather station, however I live in one of the last countries that does not know the c temps so when it says 7.2 my mind goes to 7.2 degrees near zero F not 44 degrees F and rather nice well above freezing. Any hint where I can convert so I can read the temp on the device?
Figured it out on this install. Thanks again, cool little gadget and I do love my gadgets I build gadgets for our ghost buster local club, I am not a member but my daughter is and my niece sort of runs the outfit. I am adding this to their list of electronics to find and communicate with the spirits of those who have moved on. One of my uncles told everyone that if there was an after life, he would wink at us from his coffin. He didn't.
Hi , Pleased to say after re installing arduino 2.0.0 the radio now works fine , thank you
good to hear that. thank you
Hello, when I uploaded your source code, it has been shown that there is no such code, what is the problem, thank you
HY VOLOS. Wich battery are you using?
Does it support SPI interface with another module along with its display ?
No. They haven't had the sense to bring out the SPI to pins so you can share other SPI devices. Stupid.
Thank you, It is a great project.
But , I cannot connect, if the SSID is hided ? How could solve it ?
thx!
Sorry, i dont know. Never had hidden ssod
Hi, i am getting an error, 'TFT_BL' was not declared in this scope
?
Love your videos! Help! How can i modify this sketch to fit the entire ESP32S3 screen?
Thank you, ii am afraid that is not easy, you will need to modify whole code, every drawing function.
@@VolosProjects Thanks for the reply! Aww man. I just got the ESP32-S3. I am looking for an NTP clock with weather API. I got a few different snippets of code (and beginning to understand it), but I am having trouble with getting them both working by modifying the code. I got this to work on the S3, but it's obviously cut off on the sides because of the bigger screen. :(
Good project, but could you send me or tell me where to get the TFT_eSPI library because it is displayed scrolling on the screen, Thank you
Here i made tutorial how to setup ttgo display, board and libraries
ua-cam.com/video/b8254--ibmM/v-deo.html
It would be great to make a real (not internet) weather station with ttgo t-display and sensors: bme680 (temperature, humidity, pressure and air quality tvoc) senseair s8 (co2 sensor) and pmsa003 pm2.5 (particle sensor).
How about using "Micropython + lvgl" to do it ?
Esp32+80*160 display shows our of range letter sizes
Can anyone tell me if you are able to change the brightness on the display? I just ordered one of these boards but I want to be able to make it less bright
Background led is conected to pin 5 on esp32, if you control brightnes of this led using pwm you can decrease brightnes. If this dont help send me mail, i will expalin , here i cant wrote code
Thanks a lot. I try to upload , but show the error: ''getData' was not declared in this scope.'
What should I do?
Just add getData(); at the top section of the sketch, then it will work.
I recently got one of these boards but I need a magnifying glass to see the display. So for me, this kind of UI display will not be practical.