Kidsuno Mainboard×1 |
Obstacle Avoidance Sensor×1 |
270°Servo×1 |
Connection Wire×1 |
USB Cable×1 |
Barrier Gate×1 |
Download the PDF follow the link:Barrier Gate Assembly
Or you can Watch the assemble video :
Connect the kidsuno mainboard and computer via a USB cable, and connect the servo to the G, V and D13 interface of the mainboard and the obstacle avoidance sensor to the No.1 interface of the mainboard.
Note: The brown wire is connected to G, the red wire is connected to V and the orange wire is connected to D13.
① Drag the instruction block in the Events module to the script area.
② Drag the instruction block in the Serial module to the script area and take the baud rate 9600 as an example.
③ Drag the instruction block in the Pins module to the script area. Since the obstacle avoidance sensor is connected to pin D5 of port 1 on the mainboard, then change the number 0 to 5.
④ Drag the instruction block in the Control module to the script area.
⑤ Drag the instruction block in the Serial module to the script area.
⑥ Drag the instruction block in the Pins module to the script area and put it into the block, then change the number 0 to 5.
⑦ Drag the instruction block in the Control module to the script area and change the number 1 to 0.3.
⑧ Complete Program
Click to upload the complete program to the kidsuno mainboard and power up, then click in the serial monitor area to set the baud rate to 9600. When the obstacle avoidance sensor detects an obstacle, the serial monitor will print a digital signal 0, otherwise, it will print 1.
First, set the angle of the servo to 32°. When the obstacle avoidance sensor detects an obstacle, the servo will rotate to 100°, otherwise it will not rotate.
① Find the instruction blocks
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
② Complete Program