diff --git a/docs/device/crocodile-clips.md b/docs/device/crocodile-clips.md index f9a90413..04070a35 100644 --- a/docs/device/crocodile-clips.md +++ b/docs/device/crocodile-clips.md @@ -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) diff --git a/docs/device/error-codes.md b/docs/device/error-codes.md index 16e823c7..0de6c4fe 100644 --- a/docs/device/error-codes.md +++ b/docs/device/error-codes.md @@ -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: diff --git a/docs/device/foil-circuits.md b/docs/device/foil-circuits.md new file mode 100644 index 00000000..609c1ce9 --- /dev/null +++ b/docs/device/foil-circuits.md @@ -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) diff --git a/docs/projects/hack-your-headphones.md b/docs/projects/hack-your-headphones.md index 32eeebae..1d5bef04 100644 --- a/docs/projects/hack-your-headphones.md +++ b/docs/projects/hack-your-headphones.md @@ -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! diff --git a/docs/projects/hack-your-headphones/making.md b/docs/projects/hack-your-headphones/making.md index a2dfc05a..8148e0d8 100644 --- a/docs/projects/hack-your-headphones/making.md +++ b/docs/projects/hack-your-headphones/making.md @@ -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) diff --git a/docs/static/mb/device/croc-clips/badclamp.jpg b/docs/static/mb/device/croc-clips/badclamp.jpg new file mode 100644 index 00000000..315d4efe Binary files /dev/null and b/docs/static/mb/device/croc-clips/badclamp.jpg differ diff --git a/docs/static/mb/device/croc-clips/crocclipsclamped.jpg b/docs/static/mb/device/croc-clips/crocclipsclamped.jpg new file mode 100644 index 00000000..97c0a42a Binary files /dev/null and b/docs/static/mb/device/croc-clips/crocclipsclamped.jpg differ diff --git a/docs/static/mb/device/croc-clips/foilcircuit.jpg b/docs/static/mb/device/croc-clips/foilcircuit.jpg new file mode 100644 index 00000000..a2f8a1af Binary files /dev/null and b/docs/static/mb/device/croc-clips/foilcircuit.jpg differ diff --git a/docs/static/mb/device/croc-clips/foilcut.jpg b/docs/static/mb/device/croc-clips/foilcut.jpg new file mode 100644 index 00000000..ea6dc2f0 Binary files /dev/null and b/docs/static/mb/device/croc-clips/foilcut.jpg differ diff --git a/docs/static/mb/device/croc-clips/frontclamp.jpg b/docs/static/mb/device/croc-clips/frontclamp.jpg new file mode 100644 index 00000000..eca31b20 Binary files /dev/null and b/docs/static/mb/device/croc-clips/frontclamp.jpg differ diff --git a/docs/static/mb/device/croc-clips/groundconnected.jpg b/docs/static/mb/device/croc-clips/groundconnected.jpg new file mode 100644 index 00000000..43f64c9a Binary files /dev/null and b/docs/static/mb/device/croc-clips/groundconnected.jpg differ diff --git a/docs/static/mb/device/croc-clips/jackconnect.jpg b/docs/static/mb/device/croc-clips/jackconnect.jpg new file mode 100644 index 00000000..ac84336b Binary files /dev/null and b/docs/static/mb/device/croc-clips/jackconnect.jpg differ diff --git a/docs/static/mb/device/croc-clips/jackground.jpg b/docs/static/mb/device/croc-clips/jackground.jpg new file mode 100644 index 00000000..b791178b Binary files /dev/null and b/docs/static/mb/device/croc-clips/jackground.jpg differ diff --git a/docs/static/mb/device/croc-clips/microbitattached.jpg b/docs/static/mb/device/croc-clips/microbitattached.jpg new file mode 100644 index 00000000..35c88ecf Binary files /dev/null and b/docs/static/mb/device/croc-clips/microbitattached.jpg differ diff --git a/docs/static/mb/device/croc-clips/microbitconnect.jpg b/docs/static/mb/device/croc-clips/microbitconnect.jpg new file mode 100644 index 00000000..5c7532df Binary files /dev/null and b/docs/static/mb/device/croc-clips/microbitconnect.jpg differ diff --git a/docs/static/mb/device/croc-clips/sideclamp.jpg b/docs/static/mb/device/croc-clips/sideclamp.jpg new file mode 100644 index 00000000..24db12cc Binary files /dev/null and b/docs/static/mb/device/croc-clips/sideclamp.jpg differ