Build

< Back

Looking for information on how to assemble your prize? Or maybe you're a curious soul who wants to get involved after the fact?
You're in the right place.

On this page, you'll find detailed instructions on how to wire up your own Black Box device.
Do it right, and you'll be able to compile code written in the editor and run it in the real world.

Ready? Let's go.

(Something wrong with this guide? Open an issue!)

What you need

Caveat emptor

You will need the following parts in order to follow these instructions:

If you are a prize recipient, meaning you completed a submission for Black Box before the deadline, you will have all of these parts already.
If not, you will have to source them yourself. Adafruit is one retailer which can provide all of the parts.

Depending on where your parts are coming from, some aspects may be different:

The shape

Vexata quaestio

There are multiple possible ways to lay out your device.

If your LED matrix is 0.8" square, you will be able to assemble your device using either two half-size breadboards or one full-size breadboard.
However, if your LED matrix is 1.2" square, you will need to use either three half-size breadboards or two full-size breadboards to account for the difference in size.
If you are a prize recipient, your LED matrix is 1.2" square.

The rest of this guide will assume that you are a prize recipient.

Take two of your half-size breadboards, and remove the bottom power rail from each one. Then, connect both of them together horizontally.
You can use a small utility knife to push back the plastic underneath the breadboards in order to remove the rails, but take care not to remove the plastic completely.

Next, take the third breadboard, and remove the top power rail from it.
Then, connect it vertically to the breadboard on the right.

The left half

Sic parvis magna

Let's assemble the left half of the device first, including the Raspberry Pi Pico and the piezo buzzer.

Place your Raspberry Pi Pico at the far left of the first board, with half of the pins on either side of the ravine in the middle, and gently push it into the board until it is fully seated. The Pico's USB micro B port should be on the left.
Then, place your piezo buzzer in the remaining space on the first board, making sure its two pins are in line with each other horizontally.

Next, let's add a few wires to the first board.
You will want to keep the following image around from now on:

The guide will refer to specific pins on this diagram.

Connect pin 38 (GND) on the Pico to ground (-) on the top of the first board.
Then, connect the left pin of the piezo buzzer to ground (-) as well.
Finally, connect the right pin of the piezo buzzer to pin 4 (GP2) on the Pico.

All of the other components will be placed on the second board.

The right half

Finis coronat opus

Let's assemble the right half of the device, including the buttons and LED matrix.

Starting at the left edge of the second board (the one next to the Raspberry Pi Pico), place each of your five buttons in line with each other, with half of each button's pins on either side of the ravine in the middle.
After that, place your LED matrix at the right edge of the third board, making sure that the text printed on it is facing you, and gently push it into the board until it is fully seated.
It may take some time to get the matrix aligned before you are able to push it into the board. Be very careful not to bend any of the pins on the matrix.

Next, we'll wire up the LED matrix.

If the text printed on the matrix is facing you, the pins on the matrix are laid out like this:

We'll wire up the columns first:

Then, we'll wire up the rows:

Because of the unusual ordering of the rows and columns, getting each adjacent wire near the matrix to fit in place will take some time.
Pay close attention during this stage to make sure you make all the right connections.

Finally, we'll wire up the five buttons.

Connect the bottom left pin of each button to ground (-).
Then, connect the top right pin of each button as follows:

If done correctly, the five buttons will correspond to up, down, left, right, and select, respectively.

At this point, your device is finished being assembled, and all that's left is to test it.

Using your device

Fiat lux

To test your device, you will need to open the editor.

Select the puzzle example, then click Build .uf2.
This will create a .uf2 file which can be flashed directly to your Raspberry Pi Pico.

Plug your USB cable into your Pico; then, while pressing the Pico's BOOTSEL button, plug it into your computer. Your Pico should then mount itself to your computer as a filesystem.
Drag the .uf2 file into the Pico's filesystem; the filesystem will then disappear, and the example code should start running on your device immediately.

Where wiring is concerned, the matrix should be positioned with the printed text facing towards you, but when using your device, the matrix should be positioned with the printed text facing left. With this in mind, try pressing each of the buttons on your device one at a time; you should see a different pattern on the LED matrix and hear a different tone from the piezo buzzer for each button you press.
If anything seems like it isn't working, double-check your wiring to make sure you've connected everything properly; if you need to make a wiring change, unplug your Pico from your computer first.
You don't need to hold down the BOOTSEL button every time you plug the Pico into your computer – only when you want to change the code that's running on it.

You should now have a working Black Box device, suitable for running code in the real world. Congratulations!