For more info:[ Ссылка ]
With the final design of the prototype assembled, it's time to begin running some code to the machine. We wired in our accelerometer to measure the bikes position as it falls from one side to the other and programmed it to rotate in the other direction accordingly. At first we could use the accelerometer freehand to move the motor, but once mounted on the bike, the vibration created feedback to the accelerometer which we must now filter out before proceeding.
![](https://i.ytimg.com/vi/WYyAMzNB5pQ/mqdefault.jpg)