With just a little bit of code, this 3D tilt sensor becomes a six-way switch to control an RGB LED. Video of that below.
At the heart of the bot is the MPU6050 – a combo accelerometer/gyroscope sensor that keeps track of tilt and movement. An Arduino Uno takes ... be compensated in the code.