Skip to content

Fun bare-metal and FreeRTOS-based projects using ESP32 microntrollers

License

Notifications You must be signed in to change notification settings

JosephThinhTran/ESP32_Projects

Repository files navigation

ESP32_Projects

Fun bare-metal and FreeRTOS-based Arduino projects using ESP32 microntrollers.

ESP32 boards

The projects were tested on the following ESP32 boards:

This board is more expensive than the official Espressif's DevKit, but it's equipped with camera and SD card socket.

This board is basically a clone from the official Espressif's DevKit.

Projects

1. Heart beat monitoring

1.1 FreeRTOS-based version

  • Task 1: Read sensor data and calculate heart beat.
  • Task 2: Handle data transfer to OLED screen.
  • Task 3: Send average heart rate to the serrial terminal

1.2 Bare-metal version

Both the sensor data reading, heart beat calculation, and display data on OLED screen are implemented in the "loop" function.

Required Library on Arduino IDE

  • Adafruit SSD1306 and Adafruit GFX Library for OLED display
  • Adafruit BusIO for I2C and SPI interface
  • SparkFun MAX3010x and Proximity Sensory Library for MAX3010x sensor

Required Hardware Components

Wiring MAX3010x sensor breakout board to Freenove ESP32-S3 board

5V = 5V (3.3V works for the OLED but not the MAX3010x sensor breakout board),
GND = GND,
SDA = 19,
SCL = 20,
INT = Not connected

Wiring MAX3010x sensor breakout board to ESP32-C6-DEV-KIT-N8

5V = 5V (3.3V works for the OLED but not the MAX3010x sensor breakout board),
GND = GND,
SDA = 10,
SCL = 11,
INT = Not connected

2. Multi-threaded ADC processing

Three main tasks

  • Read ADC samples (millivolts) per 100ms period.
  • Calculate average ADC voltage (millivolt) over 10 ADC samples.
  • Handle the serial terminal to display user input characters
    • If user types 'Avg', the firmware will print out the current average ADC voltage to serial terminal.

TODO: Additional tasks:

3. Heart beat monitoring over BLE

TODO:

4. Heart beat monitoring over WiFi

TODO:

About

Fun bare-metal and FreeRTOS-based projects using ESP32 microntrollers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published