Skip to main content

Posts

Showing posts with the label micropyton

UFO talks to Robot - part two

In part one of this series of posts , the project to get Consumable Robotics UFO and Dimm robot was started but focussed on the UFO kit. The goal being for some action on Dimm to trigger a series of messages being passed between the two of them. In this post, the focus moves to Dimm and the setting up the actions leading to the messaging. Stage 1 Build Using the Micro:bits port 0 (as part of the Dimm robot) for the input from the light sensor, which is included in the kit (Red lead going to 3v and the black lead going to GND). Just to note the less light there is the higher the value on the sensor. Stage 2 Code Micropython programmed through the Mu editor (see below) If light levels are high then :       scroll a message saying "calling UFO"        send the code "dimm" via bluetooth. otherwise:         scroll a message saying  "I can't see" If it recieves "ufo" via bluetooth...