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

@ -19,10 +19,10 @@
* [Duct tape wallet](/projects/wallet)
* [Watch](/projects/watch)
* [Inchworm](/projects/inchworm)
* [Milk monster](/projects/milky-monster)
* [Timing gates](/projects/timing-gates)
* [Compass](/projects/compass)
* [Telegraph](/projects/telegraph)
* [Radio](/projects/radio)
* [Code](/examples)
* [Blinky](/examples/blinky)
* [Name tag](/examples/name-tag)

View File

@ -13,41 +13,41 @@ The servo requires 3 connections: GND, 3V and a logic pin.
In this tutorial, we will equip the servo with crocodile clips to make it easier to use.
However, you could also use a shield or female to crocodile clips to acheive the same effect.
## The easy way: Alligator/Crocobile Clip to Male Jumpers #hintconnection
The easiest way to connect a servo to the @boardname@ is to use cables that have an **Alligator/Crocobile clip** on one end
and a **Male jumper (pig tail)** on the other end. You can purchase bundles of such cables from various electronic resellers.
## Custom connection
If you are running a class or activity, you should consider preparing all servos before hand.
### ~ hint
Kitronik wrote an excellent in-depth guide about using servos with the @boardname@.
Check it out at https://www.kitronik.co.uk/blog/using-bbc-microbit-control-servo/ .
### ~
## Step 1: cutout the connector
### Step 1: cutout the connector
Using the cutting pliers, cut out the dark plastic connector.
![](/static/mb/projects/inchworm/servo1.jpg)
## Step 2: strip out cables
### Step 2: strip out cables
Using the plier or a wire stripper, strip the plastic from the cables.
![](/static/mb/projects/inchworm/servotrim.jpg)
## Step 3: threading the servo cablers
### Step 3: threading the servo cablers
Thread the servo cables.
![](/static/mb/projects/inchworm/servo3.jpg)
## Step 4: crocobile clip claps
### Step 4: crocobile clip
Cut a crocodile cable in two and strip out the casing.
If possible try to use the same cable colors as the servo!
![](/static/mb/projects/inchworm/servo4.jpg)
## Step 5: thread cables together
### Step 5: thread cables together
Place the cables next to each other
@ -65,19 +65,19 @@ If the connection is weak, the microservo will not receive enough current and it
### ~
## Step 4: protect the connection
### Step 4: protect the connection
Protect the connection with electrical or duct tape.
Protect the connection with shrinkwrap tubes, electrical or duct tape.
![](/static/mb/projects/inchworm/servo7.jpg)
## Step 5: repeat for all cables
### Step 5: repeat for all cables
Repeat the same process until all cables are connected.
![](/static/mb/projects/inchworm/servo8.jpg)
## Step 6: testing!
### Step 6: testing!
It's time to test that your connection are all proper and that the servo will function **when the @boardname@ is powered by battery**.

View File

@ -69,6 +69,10 @@ Fun games to build with your @boardname@.
"name": "Inchworm",
"url":"/projects/inchworm",
"imageUrl":"/static/mb/projects/inchworm.jpg"
}, {
"name": "Milky Monster",
"url":"/projects/milky-monster",
"imageUrl":"/static/mb/projects/milky-monster.jpg"
}]
```
@ -87,13 +91,10 @@ Fun games to build with your @boardname@.
"name": "Telegraph",
"url":"/projects/telegraph",
"imageUrl":"/static/mb/projects/a8-network.png"
},{
"name": "Radio",
"url":"/projects/radio",
"imageUrl":"/static/mb/projects/a9-radio.png"
}]
```
### See Also
[Flashing Heart](/projects/flashing-heart), [Smiley Buttons](/projects/smiley-buttons), [Love Meter](/projects/love-meter), [Rock Paper Scissors](/projects/rock-paper-scissors), [Compass](/projects/compass), [Hack your headphones](/projects/hack-your-headphones), [Banana keyboard](/projects/banana-keyboard), [Telegraph](/projects/telegraph), [Radio](/projects/radio), [Guitar](/projects/guitar), [Wallet](/projects/wallet), [Watch](/projects/watch)
[Flashing Heart](/projects/flashing-heart), [Smiley Buttons](/projects/smiley-buttons), [Love Meter](/projects/love-meter), [Rock Paper Scissors](/projects/rock-paper-scissors), [Compass](/projects/compass), [Hack your headphones](/projects/hack-your-headphones), [Banana keyboard](/projects/banana-keyboard), [Telegraph](/projects/telegraph), [Guitar](/projects/guitar), [Wallet](/projects/wallet), [Watch](/projects/watch),
[Milk Monster](/projects/milky-monster)

View File

@ -0,0 +1,56 @@
# Milk monster
### @description A milky-monster like robot built with the @boardname@
### ~avatar avatar
Make a funny milky-monster robot!
### ~
https://youtu.be/egl3fNAYylk
## Duration
3 Activities, approx 30-45 min each based on familiarity with the coding concepts
## Materials
Recycled
* 1 Milk Carton (with a screwable top cap)
* 1 Small cord - recylce 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
![Materials](/static/mb/projects/milky-monster/materials.jpg)
## Preparation
* [Equip the microservo with crocodile clips](/device/servo)
* [Download and 3D-print servo clip designed for MIlky Monster from thingiverse](http://www.thingiverse.com/thing:2185971) (this is optional). Teachers may prefer to download the classroom pack (16 servo clips).
## Activities
* [Make](/projects/milky-monster/make)
* [Code](/projects/milky-monster/code)
* [Connect](/projects/milky-monster/connect)
### ~button /projects/milky-monster/make
Let's get started!
### ~
## about the author
This project was contributed by Peter Heldens [@peterheldens](https://twitter.com/peterheldens). You can checkout his [@boardname@ makershow channel on youtube](http://aka.ms/microbit-makershow) for more projects.

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
### ~

View File

@ -1,68 +0,0 @@
# radio
Measure the acceleration on the @boardname@ in the "x" direction.
### ~avatar avatar
Welcome! This activity will teach how to use the @boardname@ to chart the acceleration in the "x" direction. Let's get started!
### ~
Let's measure `acceleration (mg)` in the "x" direction. Get the acceleration value (milli g-force), in one of three specified dimensions.
```blocks
input.acceleration(Dimension.X)
```
### ~
Use the plot bar chart to visualize the acceleration on the LED screen of the @boardname@ in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in the X dimension to measure the acceleration.
```blocks
basic.forever(() => {
led.plotBarGraph(input.acceleration(Dimension.X), 0)
})
```
### ~
Notice that moving the @boardname@ in the simulator from left to right (x direction) changes the values beneath the @boardname@ in a range from 1023 to -1023 as measured in milli-gravities. By hovering over the @boardname@ from left to right, you can observe changing values beneath the @boardname@ simulator. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the @boardname@ simulator in the x direction. The line underneath the @boardname@ simulator reflect the acceleration in the x direction.
NOTE: The colors of the charts reflect the color of the @boardname@ simulator. In this instance, the @boardname@ is yellow. So the color of the data line reflects the color of the @boardname@
![](/static/mb/data4.png)
### ~
Vigorously move the @boardname@ in the @boardname@ simulatator by moving the @boardname@ image from side to side. Every time the @boardname@ moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the @boardname@ from side to side, the more data being saved in Excel. After you have vigarously moved the @boardname@ simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the @boardname@. We want a printout of our acceleration on Excel that can be graphed in Excel.
### ~
We want to chart the data collected by using a tool in Excel.
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the @boardname@ in the X direction. Then click or tap on the data Excel file that was downloaded to your local ``Downloads`` Folder.
### ~
First, click or tap on the first two columns (A, B) to include the time of the data being collected; b) the results of acceleration data on the @boardname@
![](/static/mb/data7.png)
Use the Recommended Charts command on the Insert tab to quickly create a chart thats just right for your data.
* Select the data that you want to include in your chart.
* Click Insert > Recommended Charts.
![](/static/mb/lessons/chart1.png)
* On the Recommended Charts tab, scroll through the list of chart types that Excel recommends for your data. Pick the **scatter plot**.
### ~avatar avatar
Excellent, you're ready to continue with the [challenges](/projects/radio-challenges)
### ~

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB