An open API service indexing awesome lists of open source software.

https://github.com/jimbobbennett/microbitfrienddetector

A workshop showing how to build a friend detector using the BBC Micro:Bit and MakeCode
https://github.com/jimbobbennett/microbitfrienddetector

makecode maker microbit microbit-radio

Last synced: 4 months ago
JSON representation

A workshop showing how to build a friend detector using the BBC Micro:Bit and MakeCode

Awesome Lists containing this project

README

        

# BBC micro:bit Friend Detector

The [BBC micro:bit](https://amzn.to/2UxQNiM) is a pocket-sized computer that allows you to have loads of fun whilst learning digital technology and computer science. You can program it using block-based coding and build anything - from simple programs to light up LEDs, to robots, musical instruments and more.

![micro:bit logo](https://microbit.org/images/microbit-logo-stripped.png)

In this tutorial, you will create a friend detector - a wrist-mounted gadget that lights up with a smiley face when your friends are nearby.

![The final, finished Friend Detector with a micro:bit in a duct tape strap on a wrist with lights showing a smiling face](./Images/WorkingOnWrist.jpg)

## What you will need

* A [BBC micro:bit]((https://amzn.to/2UxQNiM)) - you can buy one from Amazon by following [this link](https://amzn.to/2UxQNiM)
* A computer connected to the internet
* A micro USB cable (if you by the micro:bit Go kit linked above it contains this already). You may need a UBC-C to USB-A adapter if your computer only has USB-C ports (for example modern Macs).
* A micro:bit battery pack and batteries (if you by the micro:bit Go kit linked above it contains this already)
* Some duct tape (I recommend this [rainbow duct tape](https://amzn.to/2XLnFGN))
* Velcro

![Picture of what is needed - a micro:bit with power pack, duct tape, velcro and a computer](./Images/Parts.jpg)

## The steps

The steps to complete this workshop are:

* [Getting started](./Steps/GettingStarted.md)
* [Writing your first micro:bit program](./Steps/ProgrammingTheMicrobit.md)
* [The friend detector](./Steps/Algorithm.md)
* [Code the on start](./Steps/OnStartCode.md)
* [Code the forever block](./Steps/ForeverCode.md)
* [Detect radio messages](./Steps/OnRadioCode.md)
* [Run the code](./Steps/RunTheCode.md)
* [Build a wrist band](./Steps/WristBand.md)

Work through these steps one by one. Each step includes a link to the next step at the end.

## The code

If you want to use a working version of the code, you can import the project using the [`microbit-FriendDetector.hex`](./Code/microbit-FriendDetector.hex) file in the [`Code`](./Code) folder.

* Clone or download this repo
* From the [MakeCode home page](https://makecode.microbit.org/) select the **Import** button
* Select **Import File**
* Locate the `microbit-FriendDetector.hex` file from the `Code` folder in this repo
* Select **Go ahread!** to load the project in the MakeCode editor

You can also import the code from this URL -
[makecode.microbit.org/_du14RM7mT4fC](https://makecode.microbit.org/_du14RM7mT4fC).

* Copy the URL
* From the [MakeCode home page](https://makecode.microbit.org/) select the **Import** button
* Select **Import URL**
* Paste in the URL
* Select **Go ahead!** to load the project in the MakeCode editor.


I hope you enjoy this workshop. If you want to get in touch, you can find me on twitter - [@jimbobbennett](https://twitter.com/jimbobbennett). I'd love to hear what you are building.

Feel free to raise [issues](https://github.com/jimbobbennett/MicroBitFriendDetector/issues) with any bugs you've found, or any suggestions for changes and improvements.