Solutions to Exercise 9: Real Time Clock and Data Logging

Exercise 1:

Since connecting to the Internet through WiFi is a very common task, we develop a module doing only this. The module can be put into the /lib directory on the ESP32 (or even better: frozen into the binary of MicroPython) making it available also for later exercises.

Here is a program connecting to the Internet through WiFi. You will have to modify it in order to adapt it to your WiFi SSID and password.

https://iotworkshop.africa/pub/IoT_Course_English/SolutionsToRealTimeClockAndDataLogging/wifi_connect_UCC.py.txt

... and this is how to access it and what it will print as answers:

wifi_connect_print.png

Exercise 2:

Sometimes you may not have access to WiFi but you want to set the time nevertheless. Then the solution to exercise 2 comes in handy:

https://iotworkshop.africa/pub/IoT_Course_English/SolutionsToRealTimeClockAndDataLogging/esp32RTC.py.txt

The exercise sheet already shows how to use the program

-- Uli Raich - 2020-05-06

Comments

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt dayOfWeek.py.txt r1 manage 1.7 K 2020-05-25 - 10:29 UliRaich  
Texttxt esp32RTC.py.txt r2 r1 manage 4.5 K 2020-05-25 - 10:29 UliRaich  
Texttxt wifi_connect_UCC.py.txt r1 manage 2.0 K 2020-05-25 - 10:29 UliRaich  
PNGpng wifi_connect_print.png r2 r1 manage 42.2 K 2020-05-25 - 11:33 UliRaich  
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2020-05-25 - UliRaich
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback