Welcome to Building:bit Superkit repository
1.Dancer
Dancer
Dancer1. Learning objectives2. Building blocks3. Motor wiring4. Programming4.1 Add expansion package4.2 Blocks used4.3 Combining blocks5. Experimental phenomenon
1. Learning objectives
In this course, we mainly learn how to use MakeCode graphical programming to make Pretty car "sing" and "dance" at the same time, that is, the motor, servo, buzzer, and RGB light work at the same time.
2. Building blocks
For the building blocks steps, please refer to the installation drawings or building blocks installation album in the [Assembly Course]--[Pretty car] in the materials.
3. Motor wiring
The motor wiring on the left side of the car is inserted into the M1 interface of the Super:bit expansion board, and the black line is close to the battery side;
The motor wiring on the right side of the car is inserted into the M3 interface of the Super:bit expansion board, and the black line is close to the battery side;
As shown below:
4. Programming
Method 1 Online programming:
First, connect micro:bit to the computer via a USB data cable, and a U disk will pop up on the computer. Click the URL in the U disk: https://makecode.microbit.org/ to enter the programming interface. Then, add the Yahboom smart software package https://github.com/YahboomTechnology/SuperBitLibV2 to start programming.
Method 2 Offline programming:
Open the offline programming software MakeCode and enter the programming interface. Click [New] and add the Yahboom smart software package https://github.com/YahboomTechnology/SuperBitLibV2 to start programming.
4.1 Add expansion package
4.2 Blocks used
The location of the blocks required for this programming is shown in the figure below.
4.3 Combining blocks
The summary program is shown in the figure below.
You can also directly open the microbit-Dancer.hex file provided in this experiment and drag it into the browser that opens the URL, and the program diagram of this project source code will be automatically opened
5. Experimental phenomenon
After the program is downloaded successfully, the micro:bit dot matrix will display a smiley face, as shown in the figure below. Turn on the power switch, Pretty car will play the music "Ode to Joy", and will switch between different motion states of forward-->backward-->left-->right, and the RGB light will switch to different colors.
If you need to restart, please press the reset button on the back of the micro:bit motherboard.