Skip to content

Dudzius/F1_Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🏎️ F1 Desktop Pitwall

F1_desktop_pitwall

A desktop gadget powered by ESP32 that shows live F1 standings, race countdown, weather info, and local time — with automatic updates and notifications.

Features

  • Stage 1 – Current date and time
  • Stage 2 – Current and upcoming weather
  • Stages 3 & 4 – Constructors & Drivers championship standings (current or any past year)
  • Stage 5 – Next race name, date, countdown, and local start times
  • Automatically cycles between stages every 15 minutes or on short button press
  • Notifications (with sound) before race and qualifying (1 hour and 5 min before start)
  • Night mode: screen off between 23:00–6:00; can be toggled manually with long press
  • Auto-refresh after each race
  • Easy one-time Wi-Fi setup
  • On-screen error messages when data fetching fails

Demo:

  • STAGE 1 - Clock clock

  • STAGE 2 - Weather data weather

  • STAGE 3 - Constructors standings constructors constructorsBody

  • STAGE 4 - Drivers standings drivers driversBody drivers1976 drivers2021

  • STAGE 5 - Calendar (upcoming race) race1 race2

If there is no upcoming race selected season: raceInfErr

  • Notification notification

Hardware:

Components Used:

  • ESP32 DevKit V1
  • 16x2 I2C LCD Display
  • Buzzer
  • Push Button
  • Wires

Schematics:

circuit_image(3)

How it works

Data Sources

The device fetches data from the following public APIs:

  • F1 data from jolpi.ca/ergast

    • Race schedule, qualifying times, constructor & driver standings
  • IP Geolocation from ip-api.com

    • Used to determine latitude/longitude and IP for timezone lookup
  • Timezone info from worldtimeapi.org

    • Raw and DST offsets based on IP, used for setting system time
  • Weather data from open-meteo.com

    • Hourly temperature, cloud coverage, and precipitation probability

Functions for fetching data are with retry logic and limit, for handling faiure on API calls.

Setup - Connecting to Wifi

On boot, the ESP32 will attempt to connect using saved WiFi credentials. If none are found, it opens a captive portal where you can enter WiFi details and (optionally) a season year for F1 standings. checkingWifi

To reset WiFi credentials, power off the device, then hold the button while powering it back on. You’ll see this screen: resettingWifi

Next, you’ll see the hotspot name you should connect to: connectToHotspot

Once connected, open the captive portal and select "Configure WiFi". Choose your network from the list and enter the password:

(Optional) Enter an F1 season year. Used for past seasons data, if left empty it will be set to current year. configureWifi2

If the connection is successful, the device will begin fetching data: fetchingData

If the WiFi setup fails, you’ll see an error screen. Try setting up again: WifiNotSet

There also can be an error while trying to fetch data from APIs. User will be informed if there is such failure and recommended to reboot the device. LocationNotSet

Adjusting Screen Contrast

If the characters on the screen are not clearly visible, you can easily adjust the display contrast using the contrast screw on the back of the screen module.

contrast

Adjust slowly until the text is clear and comfortable to read.

Runtime Behavior

The display cycles through 5 stages: Clock, Weather, Constructor Standings, Driver Standings, and Race Info.

  • Every 15 minutes (or on button press), the device enters a cycle that shows all stages one by one, then returns to the Clock.

  • Weather data is refreshed hourly.

  • F1 data is refreshed automatically ~2 hours after a race ends.

  • Notifications appear shortly before race or qualifying sessions.

  • The LCD enters night mode (backlight off) between 23:00–06:00.

Button controls:

  • Short press: manually cycle through stages.

  • Long press: toggle the backlight manually (the backlight automatically switches between day/night modes at the start and end of the night, resetting manual toggles).

Power and Network Usage

Power Consumption

Based on testing with a 12,000 mAh power bank at 5 V, device operated continuously for 115 hours, consuming about 0.52 watts on average. 12,000 mAh × 5 V ÷ 1000 = 60 Wh 60 Wh ÷ 115 h = 0.52 W

This means it would take over 1,917 hours (80 days) to consume just 1 kilowatt-hour of electricity.

Powering the Device

The device can be powered in two simple ways:

  • Via a 5V USB port – Practically any USB port (on a computer or power bank) can provide the required 5V.
  • Via a standard USB charging adapter – For example, a common phone charger will work perfectly.

Data Usage

The device downloads less than 100 kb of data for a full update, making its data usage insignificant to your network.

Credits

Huge shoutout to the folks at jolpica-f1 for awesome open-source F1 API! 🏆

Thanks to WiFiManager for making WiFi super easy to setup. 🏆

I'm not much of software engineer and this is my first microcontroler project, so it is a bit rough :)


Made with 🧡 for Formula 1 fans.

Any feedback is welcome.

About

Formula 1 desktop clock, Drivers standings, Constructors standings, Race calendar.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages