In previous posts ( UFO has Landed and DIMM the OOD ), I started playing with the CBiSEducation's UFO consumable robots. Still using the Micro:Bit, in this two part post series, I am going to be playing with using Micropython to send messages between the two kits. Stage 1 Wiring and Set up-UFO Pins 0 and 1 are outputs to the LEDs The black leads on the UFO go to GND. Micropython, using the Micro:Bit's built in radio module (Bluetooth), is used to communication between the two kits. Stage 2 Code -UFO The code is set to flash the UFO's LEDs and then scroll a message "DIMM Calling" when it receives a message "dimm" via Bluetooth. Basic overview is - Turn on the radio module - radio.on() - If the message is received then turn the LEDs on and off and scrolls "DIMM calling" across the LED array. - send a message via bluetooth "ufo" to whoever is listening (in the end the robot DIMM hopefully). The code is shown below. ...
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.