micro-bit breakout manual
Micro:bit Expansion Board Front:
Back: line patrol, motor interface and magic sticker
1、RGB search light
1-2 Schematic diagram
Note：The two RGB lights are connected in parallel, so the color is controlled at the same time.
IO port：IIC PCA9685 control
R: Channel 0
G: Channel 1
B: Channel 2
Choose the normal color directly
Choose different RGB color as your thought
2、RGB flowing light
2-2 Schematic diagram
Note：This RGB light is made of three cascades, controlled the color of the three lights by one IO port.
This block is equivalent to the following block：
Specific use of this block method, please refer to the use of Neopixel library.
3、Infrared obstacle avoidance or following
3-2 Schematic diagram
Note：By transmitting infrared radiation, when there is an obstacle in front of detection, the receiving tube receives the signal, and the level from high to low indicates that there is an obstacle detected.
Transmitter IO：P9 Infrared emission at low leve ;Transmission closed at high level.
Receiver IO：P3 Obstacle detected at low level;No obstacle was detected at high level.
Explanation： This block returns True or False. If it satisfies the description of blocks, it returns True; otherwise, it returns Fasle.
Function：It can be used to avoid obstacles and follow.
4-2 Schematic diagram
Note：The tracking sensor has the same principle as the obstacle avoidance sensor. Infrared returns to be received on the white line and is absorbed on the black line,detecting a low level. In this way, the difference between the two sides of detection can know which side of the car is offset, and the corresponding control car moves in the opposite direction to achieve the purpose of line inspection.
Right probe IO：P1 The black line output low level is detected, and the L8 light will be on, indicating the black line is detected.
Left probe IO：P2 The black line output low level is detected, and the L9 light will be on, indicating the black line is detected.
Explaination： This block returns True or False. If it satisfies the description of blocks, it returns True; otherwise, it returns Fasle.
Function： It can be used to track.
5-2 Schematic diagram
Note：The buzzer is a passive buzzer .It could plays music and sing.
Note：“Block-1” and “Block-2” from official all could be used becuase our hardware is consistent with the official IO port.
6、Infrared remote control
6-2 Schematic diagram
Note：This function is achieved by our remote control.
Note：When using infrared remote control, you first need to configure the infrared receiver IO port, as shown below, can be executed at boot time, and then call the infrared remote event function, you can select all buttons corresponding to the event, then you can execute in each event any function you want to perform. As shown in the figure below, configure the infrared receiver to be connected to the P8 port. When the remote control's Power button is pressed, the car searchlight will turn on red.
7-2 Schematic diagram
Note：Ultrasound is an external module that can measure the distance in front of it to achieve obstacle avoidance and other functions.
Note：This is a packaged block. The IO port has been written in the library. Here, the ultrasonic measurement distance (cm) is returned. The distance can also be measured using the following position blocks, which is equivalent to the packaged block.
The effect of the two blocks is the same as shown in the figure below.
8-2 Schematic diagram
Note：The expansion board supports 3 - channel servo and 3 - channel independent PWM output.
IO port：The PWM wave is output by IIC controlling the channel of PCA9685 chip.
S1 Servo Channel（J2）：Channel 3
S2 Servo Channel（J3）：Channel 4
S3 Servo Channel（J4）：Channel 5
Note：Three Numbers can be selected, corresponding to the extension screen printing J2, J3, J4, Angle range can be set 0-180 degrees.
9-2 Schematic diagram
Note:IIC drives PCA9685 channel output PWM for speed control
Left motor A：Channel 12
Left motor B：Channel 13
Right motor A：Channel 14
Right motor B：Channel 15
Note：Explanation for three blocks：
The first is to control the motor direction, the default speed is the maximum;
The second is to set the speed of two motors at the same time and control the direction
The third is not only to control the direction, but also set the speed of two motors separately.
Block package URL: https://github.com/lzty634158/yahboom_mbit_en