Find limitations when simulating a program & Program the brain
I tried both MakeCode editor and Python editor. MakeCode editor is easy to use and it has a lot of different functions. I tried input, LED and music functions
Use the sensors
First, I used the accelerometer as input and sound and lights as output. Microbit doesn’t have its own speaker, so I had to connect it to a headphone. The shaking function was really stable, and the audio volume was really loud.
Then I tried the temperature sensor and the lightness sensor. They both worked quite well. Compared to Arduino, they are much easier to use.
Temperature sensor:
Lightness sensor
A basic animal behavior system
Konrad and I used the radio function to mimic a swarm of fireflies signaling to each other.
First Version: When the button on one Microbit is pressed, another one receives the signal and blinks the LED to give feedback.
Second Version: We updated the code. When one Microbit sends the signal, both Microbit will blink the LED. And then we increased the number to three Microbits.
code reference:
https://microbit-micropython.readthedocs.io/en/latest/tutorials/radio.html
The way you display the output of different sensors on the screen is turning the micro:bot into a gadget that can directly put into use. I like that.
I’m impressed by the imitation of fireflies’ communication system. I looked at the website and found out that there seems to be a lot of randomness inside the code: The firefly flashes animation after a random short pause; It randomly re-broadcast the flash message. The final performance is beautiful and spectacular (if there could be more “fireflies”). Additionally, it contains the complexity and randomness that ubiquitously exists in nature.
One more thing: I think there actually is a speaker soldered on the micro:bot.