components - micromaker€¦ · 2) click “save as” to your downloads folder. 3) connect the...
TRANSCRIPT
COMPONENTS:
3D Wood Craft Components
C1
C4
C3
C4
C5
C8
C7
C2
C7
C1
C6
C9
Z
C10 C11
C12
C12
C13
micro:bitMB Servo MotorSV
Battery CaseBC
AC Acrylic
Bolts and NutsBN
LET’S ASSEMBLE !
1 4
5
6
72
3 8
BC
C9
SV
C1 C2
Z
C9
C1
C2
Z
C3
C4
C7
C7
Z
BC
MB
AC
BC
SV
C11
C6
9
10
A5
MB
SV
0 1 2 3v Gnd
Note: Secure wires withbolts and nuts provided
*Flat part of crimpped wireto board
BN
MB
SV
Z
BC
C5
The code for this project can be downloaded from
xpc.sg/resources
1) To download, right-click on Touch Me Not.2) Click “Save As” to your downloads folder.3) Connect the micro:bit to your computer.4) Drag and drop the downloaded .hex file to your micro:bit.
CODING
1
2
3
When the micro:bit starts up, it will move to the starting position of 70º
Upon pressing button A, a smiley face will show, and the servo will be moved to the open position of 180º.There will be a short pause to let the servo go into the 180º position, after which it will close the dispenser and the icon will disappear.
Set the servo to the closed position of 70°
When Button A is pressed
Set servo to dispense position of 180°
Show a smiley face
Set servo to the closed position of 70°
Pause to let servo move into position
Clear the screen
Countdown from 3 to 1 before dispensing,pausing 1000ms in between each count
When Button B is pressed
Set servo to dispense position of 180°
Show a smiley face
Set servo to the closed position of 70°
Pause to let servo move into position
Clear the screen
When Button B is pressed, it will count down 3 seconds and dispense the candy.
Requires screwdriver
Joints which require glueJoints which require tape
Note:
11
C8
C13
C12
C12
C8
12
13
C10
C10
CANDY CRUSHER
Give me some candy!
Fasten 2 Screw to Secure Servo arm to Base
*Third Hole fromboth ends
13
Note: Secure servo armto servo motor