outline of milkjmonster lesson (#372)

* outline of milkjmonster lesson

* Inital version Milky Monster ready to publish on Github - can you please review Peli ?

* removing "radio" project

* various fixes

* updated summary

* Adding croc to male option

* commit changes

* fixed missing pdf

* fixing broken image link

* fixing servo page

* fixing markdown

* Fixing step1

* commit changes

* merging

* merge

* changed milk-monster to milky-monster

* reized image
This commit is contained in:
Peli de Halleux
2017-03-20 15:17:24 -07:00
committed by GitHub
parent 0025f7bf44
commit f041324388
19 changed files with 305 additions and 90 deletions

View File

@ -0,0 +1,83 @@
# Code
### @description code to make the Milky Monster alive
### ~avatar avatar
Add code to make the Milky Monster move.
### ~
## Duration: ~30 minutes
## Step 1: calibrate servo
In order for the Milky Monster to move, the @boardname@ needs to command the servo to go between ``0`` and ``180`` degrees at a certain pace. In the code below:
- the user pressed button ``A`` to switch the servo to 180 degrees (to close the mouth of Milky Monster).
- the user pressed button ``B`` to switch the servo to 0 degrees (to open the mouth of Milky Monster).
```blocks
input.onButtonPressed(Button.A, () => {
pins.servoWritePin(AnalogPin.P0, 180)
basic.showNumber(180)
})
input.onButtonPressed(Button.B, () => {
pins.servoWritePin(AnalogPin.P0, 0)
basic.showNumber(0)
})
basic.showString("calibrate")
```
## Step 2: attach rotor
The servo should be positioned on 180 degrees **before** attaching the rotor to it. This is to make sure the mouth of the Milky Monster will be closed once the servo reaches 180 degrees.
### ~ hint
You may use a philips scew driver to attach the rotor to the servo.
### ~
https://youtu.be/YZfkMWTeH4o
## Step 3: check calibration
When the user pressed ``A`` the servo rotor should be in 'up' position.
https://youtu.be/bAqXEawUsSM
## Step 4: connect cord to rotor
Connect the cord to the servo rotor while mouth of Milky Monster is **closed**.
https://youtu.be/AWsnwk_iA_A
## Step 5: connect cables to @boardname@
Connect cables from @boardname@ to the servo and place the battery.
https://youtu.be/fAR58GJUZdM
## Step 6: code light sensor
Code the lightsensor on the @boardname@ to control the servo.
```blocks
basic.forever(() => {
pins.servoWritePin(AnalogPin.P0, input.lightLevel())
led.plotBarGraph(
input.lightLevel(),
0
)
})
```
## Step 6: Ready!
Your Milky Monster is ready!
https://youtu.be/egl3fNAYylk
### ~button /projects/milky-monster/connect
NEXT: Connect
### ~

View File

@ -0,0 +1,28 @@
# Connect
### ~avatar avatar
Remote control your Milky Monster with another @boardname@
### ~
## Duration: ~30 minutes
You will need 2 @boardname@ for this part. By using the radio, we can make the Milky Monster controlled by another @boardname@.
Download the code below to the @boardname@ on the Milky Monster and another "controller" @boardname@. Whenere A is pressed, the Milky Monster will move once.
```blocks
radio.onDataPacketReceived(({receivedNumber}) => {
pins.servoWritePin(AnalogPin.P0, 0)
basic.pause(500)
pins.servoWritePin(AnalogPin.P0, 180)
basic.pause(500)
})
input.onButtonPressed(Button.A, () => {
radio.sendNumber(0)
})
```
```package
radio
```

View File

@ -0,0 +1,115 @@
# Make
### @description Building the cardboard Milky Monster
### ~avatar avatar
Turn a piece of cardboard into an milky-monster!
### ~
## Duration: ~45 minutes
## Materials
#### Recycled
* 1 Milk Carton (with a screwable top cap)
* 1 Small cord - recycle string from a used tea bag
* 1 Paper clip
### Electronics
* 1 @boardname@, battery holder and 2 AAA batteries
* 3 Crocodile clips
* 1 micro servo 9g SG90
* 1 servo clip designed for Milky Monster [download on thingiverse](http://www.thingiverse.com/thing:2185971) (optional). Teachers may prefer to download the classroom pack (16 servo clips).
### Tools
* Small knive and Scissors that can cut cardboard
* Tape (masking, duct tape, and/or packing tape)
* Glue gun
## Step 1: download and cut the template
[Download the Milky Monster template](/static/mb/projects/milky-monster/MilkyMonsterTemplate.pdf) and cutout the template.
https://youtu.be/ipsZuFNgTHM
## Step 2: glue template on milk carton
Glue the template on the milk carton.
https://youtu.be/2D3WFp29QC4
## Step 3: cut carton
Cut the carton (watch the fingers!)
https://youtu.be/pvC3Tnhe5QU
## Step 4: create mouth
Cut the cardboard halfways and fold the corners. This will be the mouth of the Milky Monster.
https://youtu.be/Yyk1zW4sFoM
## Step 5: extend mouth
Use tape to extend the mouth approx 1 cm. Fold one after the other.
https://youtu.be/RWJbqI03wPE
## Step 6: connect cord
Using scissors, create a small whole to insert the cord. Tape the cord on the backsite of the mouth.
![](/static/mb/projects/milky-monster/connectmouth.jpg)
Once finished position the mouth in upward position and fix the cord between the cap.
https://youtu.be/Qyndcsmt0AU
## Step 7: create space for @boardname@
Use scissors to create space at the bottom of the Milky Monster to attach the @boardname@.
https://youtu.be/3FUNI0GSbNc
## Step 8: Create space for cables
Create space to route the cables nicely on back of the milky-monster.
https://youtu.be/BoIRCk769MM
## Step 9: attaching clip to servo
Use a philips screw driver to mount the servo to the 3D-printed servo clip.
If you don't have the 3D-printed clips available, [download on thingiverse](http://www.thingiverse.com/thing:2185971) , or fix the servo using tyraps or a glue gun.
https://youtu.be/drKzo5zqvuI
## Step 10: attaching servo to milk button
Glue servo to the cap of the milk carton.
https://youtu.be/Ch_vU5LXPeM
## Step 11: cutout hole in cap
Cutout a hole in the cap to guide the string to the servo.
https://youtu.be/Ch_vU5LXPeM
## Step 12: connect crocodile clips
Connect the crocodile clips to the servo.
https://youtu.be/RiQE-9z9LrI
## Step 11: it's ready!
Your milky-monster is ready!
![](/static/mb/projects/milky-monster/ready.jpg)
### ~button /projects/milky-monster/code
NEXT: Code
### ~