Skip to content

Latest commit

 

History

History
169 lines (105 loc) · 8.96 KB

README.md

File metadata and controls

169 lines (105 loc) · 8.96 KB

F1-Arduino-Notifications

An ESP32 project to display and notify of when F1 races are and what time the sessions start at in your local timezone.

image

image

image

This project can flashed directly from a webpage, so can be setup in minutes!

Features

  • Connects to your Wifi to automatically fetch data about the next race
  • When the race is more than a week away, it will display the date of the next race (with an image on the "Cheap Yellow Display")
  • When it's race week, it will display the start time of all the sessions in your local timezone
  • It will send you notification on Telegram on the Monday of race week with the start times.

This project is a Work in Progress!

Help Support what I do!

If you enjoy my work, please consider becoming a Github sponsor!

Hardware Required

This project is designed to make use of basically ready to go hardware, so is very easy to get up and running

Currently this project runs on two types of hardware:

"Cheap Yellow Display" (CYD)

An ESP32 With Built in 320x240 LCD with Touch Screen (ESP32-2432S028R), buy from wherever works out cheapest for you:

Matrix panel

It's built to work with the ESP32 Trinity, an open source board I created for controlling Hub75 Matrix panels, but it will does work with any ESP32 that breaks out enough pins.

The display it uses is a 64x64 HUB75 Matrix Panel.

All the parts can be purchased from Makerfabs.com:

* = Affilate Link

BYOD (Bring your own display)

I've tried to design this project to be modular and have abstracted the display code behind an interface, so it should be pretty easy to get it up and running with a different type of display.

Project Setup

These steps will only need to be run once.

Step 1 - Telegram Setup (Optional)

To get notified about the races, you will need some things on Telegram.

  • Install Telegram and setup an account.
  • Search for a user called "botFather" and follow instructions to create a new bot. Keep note of this bot token
  • Start the chat with the created bot.
  • Search for a user called "myIdBot" and follow instructions to get your chat ID. Keep note of the chatID.

Step 2 - Flash the Project

This project can be flashed directly from your browser here (Chrome & Edge only)

  • For the "Cheap Yellow Display" (CYD):
    • If your CYD has one USB port, Click the "CYD" button
    • If it has two USB ports, Click the "CYD2USB" button
  • For ESP32 Trinity/Matrix panel
    • Click the "Matrix" button

This webflash code is automatically built from the main branch of this repo, so it will always be up to date.

Note: If you want to program this project yourself without the webflash, follow the Code steps below.

Step 3 - Adding your Wifi, Timezone and Telegram Details

In order to enter your wifi details, the project will host it's own wifi network. Connect to it using your phone.

  • SSID: f1Thing
  • Password: nomikey1

You should be automatically redirected to the config page.

  • Click Config
  • Enter your WIfi details
  • Enter your Time Zone - More info here
  • (Optional) Enter your Bot Token that you retrieved at the earlier step.
  • (Optional) Enter your Chat ID that you retrieved at the earlier step.
  • You can leave the other options
  • Click save

Note: If you ever need to get back into WiFiManager, click reset button twice.

The project should now be setup and start displaying the next race details!

Code

If you want to program this project manually, there are two options

PlatformIO

PlatformIO is the easiest way to code this project.

In the platformio.ini, there are several environments defined for the different boards

Environment Description
env:cyd For the Cheap Yellow Display
env:cyd2usb For the Cheap Yellow Display with two USB ports
env:trinity For the ESP32 Trinity (or generic ESP32 wired to the matrix panel the same)

When you select the environment, it will automatically install the right libraries and set the configurations in the code.

Arduino IDE

If you want to use the Arduino IDE, you will need to do the following to get it workin

The following libraries need to be installed for this project to work:

Library Name/Link Purpose Library manager
WifiManager - By Tzapu Captive portal for configuring the WiFi Yes ("WifiManager"
ESP_DoubleResetDetector Detecting double pressing the reset button Yes ("ESP_DoubleResetDetector")
ArduinoJson For parsing JSON Yes ("Arduino Json")
ezTime For handling timezones Yes ("eztime")
UniversalTelegramBot Telegram bots for your ESP Yes ("UniversalTelegramBot")
FileFetcher For fetching files/images from the web No, download from Github

Cheap Yellow Display Specific libraries

Library Name/Link Purpose Library manager
TFT_eSPI For controlling the LCD Display Yes ("tft_espi")
PNGdec For decoding png images Yes ("PNGdec")

Matrix Panel Specific libraries

Library Name/Link Purpose Library manager
ESP32-HUB75-MatrixPanel-I2S-DMA For controlling the LED Matrix Yes ("ESP32 MATRIX DMA")
Adafruit GFX library Dependancy of the Matrix library Yes ("Adafruit GFX")

Cheap Yellow Display Display Config

The CYD version of the project makes use of TFT_eSPI library by Bodmer.

TFT_eSPI is configured using a "User_Setup.h" file in the library folder, you will need to replace this file with the one from the CYD repo.

Display Selection

At the top of the F1-Notifications.ino file, there is a section labeled "Display Type", follow the instructions there for how to enable the different displays.

By default it will use the Cheap Yellow Display

Note: CYD and CYD2USB both use the YELLOW_DISPLAY define.