Just when I thought Friday couldn't get any better, a gift, for me, in the mail!
IT'S HEEEEERE! My second BBC Micro:Bit, the "official" one that will be used in my alert button project. Thanks, element14, for sending it!
This is the Micro:Bit "Go" starter kit which contains the following:
- a Micro:Bit (of course),
- a battery pack,
- a set of batteries, and
- a micro-USB cable
Basically, everything a person would need to get starting with Micro:Bits other than development tools. Simple first-run instructions are printed inside the box lid, and some basic documentation and safety information is included.
The Micro:Bit itself comes in what I can only describe as a tiny, flat coffee bag. It's a simple and cool idea, and evidently it's sustainable packaging which is an added bonus. The graphic design side of my brain appreciates the attention to tiny details.
And behold, this one's yellow!
My first Micro:Bit (obtained at a Micro:Bit workshop at a local Mini Maker Faire) has a slightly different appearance, I assume because it was an early test unit? Maybe? Note the check mark in the upper-left corner and the different thicknesses and proportions in the Micro:Bit logo (oval w/ dots):
The screws on my first Micro:Bit are holding a MI:Power board that I purchased for two reasons:
- to prevent touching the back of the Micro:Bit (a known problem, often resulting in a dead Micro:Bit), and
- to make it easier to use the device untethered
I personally dislike the battery packs that come with Micro:Bits because they're awkward and gangly, just a black box hanging from the device by a couple of thin wires, and there isn't even an on/off switch. The MI:Power board has a holder for a 3V coin battery and a built-in piezo speaker on its inner surface, and a tiny on/off switch is included on the top edge. It connects to the 3V and GND contacts through the screws that pass through those two holes, and a third screw holds the 0 contact to make it all stable. I highly recommend getting one of these boards if you plan to carry around your Micro:Bit. Mobility is an important detail in my project which I will describe later. For now, I'm only using the board for its protective properties (the coin battery is saved for a later date). Before moving ahead with the project, I plan to switch the MI:Power board to the new, element14-provided Micro:Bit.
The last piece of my project's hardware puzzle is my Raspberry Pi 3:
That thing that's wired to it is an NRF24L01 2.4GHz wireless transceiver. Why is it there? Well, as a backup plan mostly. My project features a Micro:Bit communicating with a Raspberry Pi, and currently there are only two ways to do this without a cable:
- via Bluetooth Low Energy (BLE), or
- via the plain ol' 2.4GHz radio
The 2.4GHz radio does double duty by allowing simple radio communication with other simple 2.4GHz radio devices (like other Micro:Bits) and also by providing a radio for BLE. I have been experimenting with BLE between Micro:Bits and Raspberry Pis and so far I'm underwhelmed with my success rate. I'll go into that in detail as these blog posts pile up. As a backup, I want to see if I can get a Micro:Bit to communicate with the Raspberry Pi via a simple 2.4GHz radio. That's allegedly provided by the NRF24L01 module. I have gotten two of these modules to communicate using two Raspberry Pis (works like a charm) but I have not tried it with Micro:Bits yet. Soon, soon.
Okay, enough hinting. Here's a brief rundown of my project:
Alert Button Project
User story: A person in distress pushes a button on the Micro:Bit which signals the Raspberry Pi to send a notification message to Amazon SNS (Simple Notification Service), and that message is sent to one or more individuals via SMS text message, or email, or whatever protocol is designated in SNS for the notification. Basically, think of those "I've fallen and I can't get up" emergency systems that people use to notify a service that an ambulance needs to be called and you'll be close to my goal.
Please note that this is just a user story, an excuse to experiment with wireless (preferably two-way) communication between Micro:Bits and Raspberry Pis and have it activate a notification via Amazon SNS. This project should not be used as an actual distress notification system! I promise it will not have the same reliability as a "real" distress notification system and thus should not be depended upon for anything involving health and wellness. This could just as easily be used to send "where are you" messages from a party, or "server looks like it's down" messages from a server room, or any of a number of other mundane but useful notifications that do not involve life or death. This is for fun, folks, not for profit.
As a bonus, I already have the basics of Amazon SNS worked out. Setting up a REST API for notifications requires lots of steps that I'm sure element14 does not want to see posted in the Micro:Bit blog section, so instead I'll point you here and ask that you follow those instructions if you wish to implement an API on your own. It's a decent first step for you while I'm working out how to get wireless communication between Micro:Bits and Raspberry Pis, which unfortunately is taking a lot longer than I anticipated. I'll repost the link to the API instructions a number of times, I'm sure, so don't sweat it if you forget which tiny link in this post takes you there. We're just getting started.
Okay, enough. I'll probably reformat this post, edit it down to a more reasonable length (it needs it!), and formalize things a bit. For now, I wanted to post something saying I have the Micro:Bit and I'm excited to start making this all work.