Required Parts
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Step 8
Step 9
Step 10
Calibration is required after the servo is mounted. Connect the servo to D13 on the board and connect the board to computer via USB cable.
Open KidsBlock, click File –> Load from your computer.
Choose D:\Code\1.Code_kidsuno to open Servo_Calibration.sb3 file.
Click to connect to port and then
.
After calibration, disconnect the board to the computer and continue the assembly.
Step 11
Step 12
Note that the two gears mesh in order to drive smoothly.
Step 13
Step 14
Completed
Open KidsBlock and connect the board to your computer. Click File –> Load from your computer.
Choose D:\Code\1.Code_kidsuno to open 4.1Card-scanning access control machine.sb3 file.
Replace the ID card value in the code into yours.
Click to connect to port and then
.
Conceive:
First, set the rotation angles for opening and closing the door. Herein, we set angle to 120° to open the door, and 0° to close the door.
Then, when the RFID module receives a correct IC card code, it drives the servo to open the door for 3s. Otherwise, servo stays still.
Build blocks:
Initialization:
Loop:
Determine whether the IC card code is correct. If yes, servo opens the door. If not, close the door.
Replace the ID code with yours.
After uploading code, scan the correct IC card, and the door will open for 3s and then close.