How to make a meme with micro:bit ?
Materials
micro:bit x 1
Servo x 1
Bricks x N
Hardware Connections
Insert the micro:bit and connect the servos to S0 port to Wukong expansion board.
Bricks build-up
Build a device as the picture shows:
Software programming
Go to MakeCode page. (https://makecode.microbit.org/#editor) Add the package of Wukong, click the extension in the settings of the menu on the upper right side.
Search with“wukong”to download it .
Now let us go to the coding page: Drag show icon block, set the leds on wukong extension board, and initialize the RGB in on start block.
In forever block, set the servo connecting to S0 as 90 degrees and save a random value among 1~4 as i . Pause for 1000ms, set RGB in red and a smile face displaying on the micro:bit while i=1.
Program in the same way for i=2、i=3、i=4, lastly set the servo rotate 30 degrees and pause for 5000ms.
Link:https://makecode.microbit.org/_0RV6xR8eW21f
Result
An icon is displaying on the micro:bit while on start, the board is put down every 5 seconds and lifted after one second; the expression and colors change at random.
Share this post
About the Author
ELECFREAKS focuses on microbit and publishes interesting articles
Related Posts
Introduction to the history of the BBC micro:bit
New BBC micro:bit-micro:bit V2
Topics
- Curriculum
- Course
- Micro bit supplier
- Wholesale Suppliers
- Micro bit tutorial
- Micro bit classroom pack
- Mcorbit Environment Monitoring
- Temperature-controlled
- Motor
- Fan
- TPBot car
- TPBot
- Micro:bit car
- AI Lens
- Micor:bit AI Lens
- Micro:bit LEDs
- BBC micro:bit
- Micro:bit Manipulator
- Wukong board
- Cutebot
- Micro:bit Motorcycle
- Nezha breakout
- Micro:bit DIY
- 360° servos
- AI Lens
- Retro Arcade
- Ecode
- PlanetX
- Microbit programming
- Your:bit
- Do your:bit
- IoT:bit
- Octopus
- Rainbow LED Ring
- Joystick:bit
- Wonder Building Kit
- Sensor:bit
- Downie
- Wenjie
- Laser Engraver Tutorial
Tags
Comments