In this tutorial we will be extending the mini Float tutorial to control it with the IMU Block. Before starting this exercise you will need to complete the Mini Float tutorial.
For this tutorial you will need an additional:
- IMU Block
- Wifi/Bluetooth Block
- Power Station Block
- In addition to the blocks you already have connected for the Mini Float, connect up a separate stack with an IMU, Wifi and Power Station Block. You should have 6 blocks connected to your Kitsunei Creator.
- Insert the IMU and connect it to the Car Controller Block.
- In the IMU Logic Maker create the Logic below and hit apply.
As you tilt your IMU the rate at which your car moves will be proportional to how much you tilt your IMU. This is done by using the MAP Gate to change the IMU readings to a speed for each of the directions for the car to move.
Tilt your IMU and see your float move around!