via GIPHY 4Tronix's Eggbit (in fact I bought three of them https://shop.4tronix.co.uk/collections/bbc-micro-bit/products/eggbit-three-pack-special :-) recently) is a cute add-on for the microbit (see above). In two previous posts I looked at eggbit using microcode to produce a hug avoider - warns when people at too close. - https://robotsandphysicalcomputing.blogspot.com/2021/12/hug-avoider-2-4tronix-eggbit.html - 4tronix Eggbit - cute and wearable - hug avoider This post replicates some of this, but this time using Python and shows the stages of the build Get the ultrasound to find the distance; Produce smile and surprise on the eggbit's 'mouth'; Produce rainbow on the neopixels or all the pixels turning red; Bring it all together so if the person is too close, less than 30cm it reacts. 1. Ultrasonic detection Probably the most challenging bit of this was getting the ultrasonic distance measrement working. It actually is not that difficult; e...
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.