A dancing bot - 3x3 box for the body, with two legs.
Thanks to a loan of a Micro:Bit from Lancaster University I can experiment with an actual micro:bit (@SCC_Lancaster @LMcUnderwood)
Experiment 1 - Using the buttons
So the functions for the idea were:
- Button A - Move to the left and then back to the starting position;
- Button B - Move to the right and then back to the starting position;
- Buttons A+B - Jump up and then back to the starting position;
- Shake - 'Crouches' and then back to the starting position
On the Microbit
Experiment 2- To add left and right tilting to it.
So if the micro:bit is tilted to the right the 'bot' moves to the right, and the same for the left.
The tilting operation here is essentially - when the x on the accelerometer is less than zero move the 'bot' to the left and when it greater than zero go to the right.
Video showing it in action
All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.
No comments:
Post a Comment