Commit 130ac59d authored by Árni Björnsson's avatar Árni Björnsson
Browse files

Microbit

parent d95bbeb0
Pipeline #318563 passed with stage
in 59 seconds
......@@ -243,6 +243,65 @@ Within the PlatformIO project task menu, select ``Build``. This will build the p
![type:video](../images/week09/upload.mp4)
## micro:bit
The [micro:bit](https://microbit.org/) is "is a pocket-sized computer that introduces you to how software and hardware work together. It has an LED light display, buttons, sensors and many input/output features that, when programmed, let it interact with you and your world."
It's a brilliant little thing to experiment with, easy to use and real cheap. Chances are that your local school or Fab Lab has plenty of them available for trying them out.
### How to use
There are a few ways to program the microbit, one of the simplest is to do it in browser!
For python programming, you visit this [site](https://python.microbit.org/v/2), for the block editor you visit this [site](https://makecode.microbit.org/). I chose the python one.
We are then presented with a screen like this:
<figure markdown>
![Python microbit IDE](../images/week09/bit01.jpg)
<figcaption>Python microbit IDE</figcaption>
</figure>
To connect the board, use a USB cable to connect the board to your computer and select "Connect". (Note, chrome is recommended for this)
You should be presented with a dialog which lists your micro:bit, select it and "Connect".
Now you can program it using the browser, simple as that!
Here is the [documentation](https://microbit.org/get-started/user-guide/python/) for the python part, which covers a lot of stuff!
Using this bit of code from the site, we now have input (buttons) and output (the led screen)
```
from microbit import *
while True:
if button_a.is_pressed():
display.show(Image.HAPPY)
if button_b.is_pressed():
display.show(Image.SAD)
```
Pressing button A (left)
<figure markdown>
![Happy](../images/week09/bit02.jpg)
<figcaption>Happy</figcaption>
</figure>
Pressing button B (right)
<figure markdown>
![Sad](../images/week09/bit03.jpg)
<figcaption>Sad</figcaption>
</figure>
Loads of fun possible.
#### Microbit classroom
There is also a [microbit classroom](https://classroom.microbit.org/), which is really nice! Last year I presented the classroom during a scandinavian school learning summit, which the FabLabs in Iceland helped organize, where the microbit was introduced, teachers experimented with them and then we played [treasure hunt](https://microbit.org/projects/make-it-code-it/treasure-hunt/). I adjusted the code a bit, hid plenty of microbit around the school and teacher hunted for them! Brilliant times!
## Datasheets
I did not manage to carve out the time to read all 479 pages of the complete [datasheet](http://ww1.microchip.com/downloads/en/DeviceDoc/40001911A.pdf). I did however, found a [link](https://www.atmel.com/images/doc2549.pdf) to a summary datasheet which I believe should suffice =)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment