Questions about a circuit? Ask in the Wirecora Discord →Questions? Ask in the Wirecora Discord →

Smart bike indicators

Lean the bike to the left and the left half of the LED strip sweeps amber from the middle outwards. Lean right and the right half does. Straighten up and the strip goes dark.

From the Short Smart Bike Indicators | Arduino + MPU6050 (2.5M views, posted 3 October 2026). Opens on YouTube.

An Arduino Uno, a GY-521 MPU6050 board on a handlebar, a 470 ohm resistor and a WS2812B LED strip with the left half lit amber
The circuit as wired in the Short. Every wire end is a real pin; the netlist was checked before the video went out.

Parts

  • Arduino Uno R3
  • GY-521 board with the MPU6050 tilt sensor (it has its own 3.3 V regulator, so 5 V in is fine; address 0x68)
  • WS2812B LED strip, 16 LEDs (8 for each side)
  • 470 ohm resistor, 1/4 W, in the strip's data line
  • 5 V 2 A power supply (8 amber LEDs take about 0.3 A)
  • Wires. A 1000 uF capacitor across the strip's 5 V and GND is good practice and is not drawn in the Short.

How it is wired

  1. Supply plus (red) to the strip's red wire (5V) and to the Uno's 5V pin.
  2. Supply minus (black) to the strip's black wire (GND) and to an Uno GND pin.
  3. Uno pin D6 to the 470 ohm resistor; the resistor to the strip's green wire (DIN, the data input at the start of the strip).
  4. Uno 5V to GY-521 VCC; Uno GND to GY-521 GND.
  5. Uno A4 (SDA) to GY-521 SDA; Uno A5 (SCL) to GY-521 SCL.

How it works

  1. The MPU6050 measures which way gravity pulls. From its two sideways readings the Uno works out the lean angle.
  2. Past about 6 degrees to one side the Uno lights that side's eight LEDs one after another, from the middle outwards, in amber.
  3. Back under about 3.5 degrees the Uno clears the strip. The two different angles stop the lights flickering on and off near the edge.
  4. The strip has one data input. Every LED is addressed by its number, so one wire from D6 drives both halves.

The code: bike_indicators.ino

The Arduino code for this circuit is in the Wirecora Discord, in the channel #arduino-code (owner’s choice, 14 October 2026: the code lives where you can ask about it). It is a plain .ino file you can download there.

Written for this page from the Short's checked wiring. It uses the Adafruit NeoPixel library (Sketch, Include Library, Manage Libraries) and has not been run on a real board yet; if left and right come out swapped, change the signs of the two angle tests.

Get the code in #arduino-code

What the video simplifies

  • The bike in the Short leans 22 degrees; a real indicator would also use the steering or a timer, not the lean alone.
  • The chase speed, the amber flare and the twinkle on the lit LEDs are drawn for the video.
  • The Uno is powered through its 5V pin, which bypasses its own regulator: do not plug in USB at the same time.

All 5 V. On a real bike put the strip's supply behind a fuse and keep the boards in a box out of the rain.

Build it yourself

The wiring board cannot run an Arduino program yet, so this one cannot be opened on it. Start with the guided first build on the wiring board, where a circuit really works as you wire it, then try the ready-made ones.

Your first circuit, step by stepAll circuits from the Shorts

Stuck, or built it?

Ask about this circuit or show your build in the Wirecora Discord. Questions get an answer every day.

Ask in the Wirecora Discord