Through the introduction of the turtle extension library in the previous article, we have learned the basic concepts of turtle graphics. In this article, let’s learn how to draw a helix with micro:bit. Press the button A to draw a helix on the LED screen, and press button B to eliminate the helix as the same way:
While browsing the makecode website, you may find a very interesting extension library-Turtle, which is a micro:bit extension library that is used to control a LED highlight, and then control its movement through programming, we can also draw the movement track to create complex graphics, there is limited by the size of the dot matrix on the micro:bit board, there are not many complex graphics that can be drawn, but it is still worth a try. Below is a spiral I drew
This is a small game that tests memory. It will display five characters in a row, and then wait for key input. When the player presses the keys in the correct order, √ is displayed. If the key is entered incorrectly, × is displayed and the game restarts. This is a simple game and you can have a try of optimizing and increasing the difficulty on the basis of this game.
The rainbow LED changes in accordance with the color of the cards and it executes the defined functions accordingly(move forward,;change the color of the headlights at random; obstacles avoidance; line-following)
Now I’m going to use micro:bit to make a breathing light. The breathing light means that the light changes gradually from bright to dark under the control of a micro:bit, and it feels like a person is breathing. It is widely used in mobile phones and has become one of the selling points of new mobile phones of major brands, acting as a notification reminder. First look at the effect:
Cats are animals with strange tempers sometimes, they will run away from you while you want to touch them; and when you want to focus on your work, they just keep annoying you. Thus, I’m gonna make an automatic device with the help of the laser that is able to tease the cats.
It might be awkward for us to directly say “I love you” to our loved ones in Chinese culture, if you have a micro:bit in hand, how could we use it to express our love? Now I am gonna make a heart-beating icon in the micro:bit display as below: