In this project, we will add an LED Matrix to the breadboard and create a "balancing dot" — a single dot on the LED Matrix that moves around as we tilt the CREATOR Kit.

For this project, to keep things simple, we will only move the dot left and right on the LED Matrix.

You'll need to wire up both the Accelerometer and LED Matrix as done in previous projects. Here is what your breadboard should look like once the accelerometer is properly wired:

For our first balancing dot project, we're simply going to put a single dot on the screen and have it move left when the CREATOR Kit is tilted left and move right when the CREATOR Kit is tilted right.

Most of the code should be very familiar, as it comes from the initial project and project. The code that's new is highlighted with arrows:

The new additions we've made are (highlighted with arrows above):

Give it a try and see how it works...

  1. Can you make the dot move faster when tilted?

  2. While keep the code above the same (that allows you to balance the dot left and right), can you add code to change the row (Y coordinate) that the dot is on? You can change the row randomly, or in sequential order.