Automatic Bike Turn Signal Project!
What inspired it
I wanted to build something simple that uses motion sensing in a visible, interactive way. A tilt-triggered LED and display combo sounded useful for both learning and prototyping.
What I learned
- How to use the MPU6050 sensor with the ESP32-C6
- Reading acceleration and temperature data using the
Adafruit_MPU6050library - Controlling a 4-digit alphanumeric I2C display with
Adafruit_LEDBackpack - Using
millis()instead ofdelay()for timed events - Formatting strings with
snprintf() - Using PWM to fade LEDs
- Learning to code in C++ and solder header pins
How I built it
- Connected the MPU6050 and display over I2C using
Wire.begin(6, 7)on the ESP32 - Programmed the device to:
- Pulse the left LED and display "LEFT" when tilted left
- Pulse the right LED and display "RGHT" when tilted right
- Alternate between showing temperature and "OK" every 3 seconds when level
- Pulse the left LED and display "LEFT" when tilted left
- Used a breadboard for testing
Challenges
- Debugging I2C issues and confirming sensor addresses
- Initially set the wrong pins for custom I2C on the ESP32
- Designing a case was difficult — my 3D printer is really old and unreliable, so I stuck with its breadboard form. I'm happy to have completed the circuit.
Log in or sign up for Devpost to join the conversation.