- It is a fair RC car - moves quite nicely, especially corners. Tilt emulates 'gears' - tilt forward once to 'shift' from reverse to stop, then tilt forward again to shift from stop to forward. Similar for tilt back.
- Once you've driven it round a path, SHAKE your RC then push A - the bitbot will now retrace the path you drove. Its cool!
- You will need 2 microbits - one is your Remote Controller (RC) the other controls the bit:bot.
RC_StorePath_1.pyonto your RC micro:bit.
bitBot_PostPath_1.pyonto your bit:bot micro:bit.
- I had to remove comments from the long one - I was getting memory errors. It worked, but comments are sparse. (Sorry.)
- Neopixels are a bit erratic - I have limited their use on this basis.
For me on this, nothing. This was a POC for a bigger project I am planning. It would be interesting to have a reverse path option (this was my original idea) - that should be quite easy (although repeating the forward path was easier, hence that being in the first iteration!). Analog out to vary speed would be nice - maybe implemented via a few more 'gears' on tilt. And of course better Neopixel support.
What is good about this:
- The RC actually has a not-so shabby implementation of button_down and button_up.
- It also drives quite nicely, although you may want to set the tilt active level to your tastes.
- Efficiency of radio transmits - only send 1 per event; I like that. Early iteration appeared to have issued with radio commands stacking up.
- Every so often the button release does not process properly and the robot spins despite button release. Perhaps a draw-back to single radio transmits!
- After the path has been retraced once, that's it. (work in progress)
- There is an upper limit on the size of the path - not really quantified yet.
- Some radio packets are dropped / missed. I don't think this is the code, but it could be.
Note - I expect that the code will work with similar robots. You may need to make a few minor tweaks to
bitBot_PostPath_1.py for each though. The key is that there are 4 pins: 1 forward left, 1 back left, 1 forward right, 1 back right. The target robot is a state machine ;)
Conceived and written by Philip Meitiner - @PragmaticPhil.
Do with it what thou wilt.
Thanks to several people who helped me discover the vagaries of Python. No names though, because I don't want your esteemed reps to be denigrated by my humble scratchings. And also to 4Tronix for giving me a bit:bot :)
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!