adding lessons to create circuit using aluminium foil

This commit is contained in:
Peli de Halleux 2016-10-13 12:52:47 -07:00
parent b0392da8b1
commit ef8d7185ee
16 changed files with 99 additions and 13 deletions

View File

@ -1,11 +1,40 @@
# crocodile clips
The large holes at the bottom of the board are designed to attach alligator/crocodile clips.
Register an event that will execute whenever the user attaches one side of the crocodile clip to the `GND` pin, then connects and disconnects the unattached side of the crocodile clip to pin `0`, `1`, or `2`.
The large holes at the bottom of the board are designed to attach alligator/crocodile clips
to create electrical circuit with other components.
### Example: on pin pressed with random numbers
# ~hint
This example displays a random number every time the crocodile clip holds `GND` then connects and disconnects the `P0` pin. Each time the crocodile clip is firmly connected and disconnected from pin `P0`, the micro:bit will return a random Number between 0 and the parameter limit
**No crocodile clips!?!?!** Use wires or Aluminium foil! [Read more...](/device/foil-circuits)
# ~
## Connecting Crocodile Clips
The hole for ``P0`` and ``GND`` allow to grab the board on the side which makes for a great grip.
![](/static/mb/device/croc-clips/crocclipsclamped.jpg)
Pass one jaw in the hole and grab the side of the board with the other jaw.
![](/static/mb/device/croc-clips/sideclamp.jpg)
For the center holes, ``P1`` and ``P2``, you can also grab the bottom of the board but they are a bit harder to grip.
You can also grip the board between the jaws. In which case, you will want to make sure to avoid overlapping the jaws
with the other pins as it will create short-circuit in the board.
![](/static/mb/device/croc-clips/badclamp.jpg)
Adding a little tape helps keeping the crocodile clips in place.
![](/static/mb/device/croc-clips/frontclamp.jpg)
## Example: on pin pressed with random numbers
This example displays a random number every time the crocodile clip holds `GND` then connects and disconnects the `P0` pin.
Each time the crocodile clip is firmly connected and disconnected from pin `P0`, the micro:bit will return a random Number between 0 and the parameter limit.
```blocks
input.onPinPressed(TouchPin.P0, () => {
@ -13,11 +42,6 @@ input.onPinPressed(TouchPin.P0, () => {
})
```
### Connecting Crocodile Clips
![](/static/mb/crocodile-clips-2.jpg)
### See also
[micro:bit pins](/device/pins), [pin is pressed](/reference/input/pin-is-pressed), [analog read pin](/reference/pins/analog-read-pin), [analog write pin](/reference/pins/analog-write-pin), [digital read pin](/reference/pins/digital-read-pin), [digital write pin](/reference/pins/digital-write-pin)
## See also
[micro:bit pins](/device/pins)

View File

@ -1,7 +1,5 @@
# Error codes
The micro:bit error codes
Your micro:bit may encounter a situation that prevents it from running your code. When this happens, a frowny face will appear on your micro:bit screen (see picture) followed by an error number.
Below is a list of error numbers and what they mean:

View File

@ -0,0 +1,52 @@
# foil circuits
The large holes at the bottom of the board are designed to attach alligator/crocodile clips
to create electrical circuit with other components.
If you do not have crocodile clips at hand, dyou can use wires or even Aluminium foil to acheive the same result.
We will show you how to connect the micro:bit to headphones using Alumunium foil and tape.
https://youtu.be/mhXYyPuvpz0
### Materials
* micro:bit and battery pack (you can also power it via USB)
* a small piece of cardboard
* Aluminium foil
* tape
### Assembly instructions
Tape the micro:bit and battery pack to the card board. Make sure to remove the batteries while you are building your circuit.
![](/static/mb/device/croc-clips/microbitattached.jpg)
Cut the thinest strip of foil possible and roll it into a cable. You can also try to fold, whatever works for you.
Build two of those wires.
![](/static/mb/device/croc-clips/foilcut.jpg)
Place the foil wire on the ``GND`` pin and attach with a piece of tape. Press hard to get the best connection between
the foil and the pin board. Make sure the foil is not overlapping with the other pins!
![](/static/mb/device/croc-clips/groundconnected.jpg)
Place the second wire on the ``P0`` pin the same way. Make sure the wire does not overlap with the other pins!
![](/static/mb/device/croc-clips/microbitconnect.jpg)
Tape the headphone jack connector to the cardboard and roll the wire coming from ``GND`` around the metal base.
Make sure the wire does not touch the other metal rings on the jack.
![](/static/mb/device/croc-clips/jackground.jpg)
Tape the second wire on the head of the jack connector.
![](/static/mb/device/croc-clips/jackconnect.jpg)
![](/static/mb/device/croc-clips/foilcircuit.jpg)
## See also
[micro:bit pins](/device/pins)

View File

@ -24,6 +24,12 @@ Build your own music player micro:bit from headphones.
* [Connect your headphone](/projects/hack-your-headphone/making)
* [Play sounds!]()
# ~hint
**No crocodile clips!?!?!** Use wires or Aluminium foil! [Read more...](/device/foil-circuits)
# ~
### ~button /projects/hack-your-headphones/making
Let's get started!

View File

@ -6,6 +6,12 @@ Did you know you could attach your headhpones to the micro:bit to generate sound
### ~
# ~hint
**No crocodile clips!?!?!** Use wires or Aluminium foil! [Read more...](/device/foil-circuits)
# ~
### Step 1
![](/static/mb/lessons/banana-keyboard-1.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB