In the previous two post I built and played with a robot unicorn from Do it Kits https://doitkits.com/product/robot-unicorn/ . In the first post, python was used to get it to move forward, backwards, left, right and stop. The second post discussed using a second microbit to send the movement instructions via the microbit's radio module. This post looks at extending the idea to using the accelerometer to pick up directions and send them to the robot unicorn (that still seems weird to write). Microbit's accelerometers, using the x and y directions, provide the inputs and then send the direction commands. The robot unicorn code is the same in the second post , the new code for the gestures is shown below. This a work in progress it detects x and y changes together so it does have a tendency to do one direction and then the other. This needs further work. All my code for the robot unicorn projects can be found at: https://github...
Robots and getting computers to work with the physical world is fun; this blog looks at my own personal experimenting and building in this area.