Introduction: HackerBox 0099: Neunundneunzig

Welcome to HackerBox 0099. Discover the ESP32-2432S028R development board (popularly known as the CYD).  Configure software tools for the CYD and assemble a laser-cut acrylic enclosure. Interface a Wii Nunchuck controller to the CYD's I2C bus. Use the Wii Nunchuck to play Tetris and other games. Place JPEG compressed images onto a MicroSD card using a USB interface module in your PC.  Present a slide show on the integrated display of the CYD by decompressing and displaying JPEG image files. Leverage a MicroSD sniffer module to access additional I/O pins from the ESP32 microcontroller. Join us in celebration... We are thrilled to present the 100th HackerBox! Thank you so very much for participating in this journey and for your support to achieve this exciting milestone.

HackerBox is the original monthly subscription box for electronics, computer technology, and hacker culture. Each HackerBox is a discovery box, which means all members await and enjoy a new surprise each month. Tech, toys, knowledge, and fun. It's like having a hacker convention, your birthday, and the first day of school - every month - right in your mailbox.

There is a wealth of information for current and prospective members in the HackerBoxes FAQ. Almost all of the non-technical support emails that we receive are already answered there, so we'd really appreciate it if you can take a few minutes to read the FAQ.

Supplies

This Instructable contains information for getting started with HackerBox 0099. The full box contents are listed on the product page for HackerBox 0099 where the box is also available for purchase while supplies last. If you would like to automatically receive a HackerBox like this right in your mailbox each month, you can subscribe at HackerBoxes.com and join the party. Subscription members save at least $15 every month and automatically receive each new HackerBox shipped immediately off the production line.

A soldering iron, solder, and basic assembly tools are generally needed to work on the monthly HackerBox. A computer for running software tools is also required. Have a look at the HackerBox Workshops for tools and supplies along with a wide array of introductory activities and experiments.

The most import thing you will need is a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. Take each step slowly, mind the details, and don't be afraid to ask for help.

WEAR SAFETY GLASSES WHEN SOLDERING, WHEN TRIMMING WIRE LEADS, OR WHEN CUTTING, DRILLING, ETC.

Step 1: One Hundred HackerBoxes

While this is HackerBox 0099, it is in fact the one hundredth HackerBox. Cent'Mesi!

In zero-based numbering (wikipedia), the initial element of a sequence is assigned the index 0, rather than the index 1 as is typical in everyday non-mathematical or non-programming circumstances. Under zero-based numbering, the initial element is sometimes termed the zeroth element, rather than the first element. Numbering sequences starting at 0 is quite common in mathematics notation, particularly in combinatorics.

In computer science, array indices usually start at zero in modern programming languages (e.g. C, Python, and Java), while older languages, such as COBOL and FORTRAN often index data arrays starting at one.

In non-mathematical or non-programming contexts, counting often begins at 1, but this is not universally true, for example a calendar does start with the first of the month, but a stopwatch starts at zero.

Computer programmers often use zero-based indexing and the term "zeroth" in situations where others might use one-based indexing and the term "first". For example, the 1978 classic text The C Programming Language (often referred to as K&R) begins with chapter zero. In 2015, HackerBox 0000 was the initial installment of the original monthly subscription box for hackers and computer enthusiasts.

Semantics aside, let's party like it's 1999 with Ninety-Nine Red Balloons aka Neunundneunzig Luftballons.

Pseudorandom Trivia: The founder of HackerBoxes, technologist Joe Long, was one of 10,000 ravers on the streets of downtown L.A. being filmed by James Cameron to create a huge 1999 party scene for the Cyberpunk Thriller Strange Days. Joe had this to say about numbering systems... "Computers do not care in the slightest that you happen to have ten fingers."

Step 2: ESP32-2432S028R Development Board

The ESP32-2432S028R Development Board features an ESP-WROOM-32 Dual Core MCU coupled to a 320 x 240 full-color 2.8 inch touchscreen display. The ESP32 features a 240MHz Clock, 4MB Flash, Wi-Fi, and Bluetooth Wireless.

When the board is first plugged into USB power, a demonstration of various user interface elements is presented on the touchscreen.

Brian Lough has recently popularized this development board. As Brian quite aptly explains, "ESP32-2432S028R" does not exactly roll off the tongue. Accordingly, he proposed the name "Cheap Yellow Display" or CYD for short. Luckily, this improved moniker seems to be sticking.

Watch Brian's Video introducing the CYD and also check out his github repo.

Next, visit the Setup and Configuration Page for details on setting up the Arduino IDE for use with the CYD as well as configuring the TFT_eSPI library.

At the bottom of that setup page there is a link to various examples. Probably the simplest one is in the "Basics" folder as the sketch named "1-HelloWorld.ino". That's a good place to start.

The ESP32 Marauder project has been ported to the CYD. Visit the Marauder Wiki to learn more about this suite of offensive and defensive wireless hacking tools for Wi-Fi and Bluetooth. Please be ethical in your cybersecurity research pursuits!

Step 3: Laser Cut Acrylic Enclosure

  • Each acrylic panel as a protective frosted clear film on both sides (four sheets total)
  • The protective film should be removed (unless you like the frosted effect)
  • Put the acrylic with screen cutout over the screen with the notch lined up over R21
  • Place four longer (9mm) screws trough the front of the acrylic and through the PCB
  • Gently tighten the brass standoffs onto the back of the PCB
  • Position the second piece of acrylic onto the backside of the PCB
  • Line up the openings with the buttons and ports
  • Place the four shorter screws (7mm) through the back of the stack
  • Tighten the screws gently into the brass standoffs

Step 4: Wii Nunchuck Game Controller

The I2C Breakout Module for connecting a Wii Nunchuck Game Controller can be wired up as shown. The wire colors on the JST-DuPont cable may not match those shown, so focus instead on the pin order and the PCB markings on both ends of the connection.

Use the Arduino IDE Library Manager to search for and install:

NintendoExtensionCtrl by David Madison

Grab the sketch TetrisWithNunchuck.ino and program it to the CYD.

Step 5: JPEG Slideshow From Micro SD Card

The CYD has a built in Micro SD slot. This can used for data logging, storing media for the MCU, and a variety of other applications. Let's try a slide show example...


First, grab the sketch Slideshow.ino

This will require installing three more Arduino Libraries:


Use the Arduino IDE Library Manager to search for and install:

"XPT2046_Bitbang_Slim" for interfacing with the touch screen


Use the Arduino IDE Library Manager to search for and install:

"SdFat" by Bill Greiman for accessing files on an SD card


Use the Arduino IDE Library Manager to search for and install:

"JPEGDEC" by Larry Bank for decoding JPG images


Copy a few JPG files onto a Micro SD card using the Micro SD USB Interface Module as shown in the image above.

Place the Micro SD card into the CYD


Compile and upload the sketch into the CYD

Step 6: Micro SD Sniffer Module

While the CYD has so many built-in features, there are only four ESP32 IO pins broken out through the JST connectors for us to use. In a pinch, we can break out four additional IO pins using a Micro SD Sniffer Module.

Step 7: Trust Your Technolust

We hope you are enjoying this month's HackerBox adventure into electronics, computer technology, and hacker culture. Reach out and share your success in the comments below or on other social media. Email support@hackerboxes.com anytime with questions or whenever you need some help.

Want more? Surf over to HackerBoxes.com and join us as a monthly HackerBox subscription member. You'll get a cool box of hackable gear delivered right to your mailbox every month and you'll enjoy a generous member discount.

Please consider sharing this free Instructable with others who may be interested in learning about these subjects. We really appreciate your support and "word of mouth advertising" is the greatest compliment that we can receive.