HackerBox 0055: High Roller

by HackerBoxes in Circuits > Electronics

4685 Views, 9 Favorites, 0 Comments

HackerBox 0055: High Roller

WholeBoxInstruct0055.png

Greetings to HackerBox Hackers around the world! With HackerBox 0055, you're the D20 High Roller in the Incident Response Card Game, Backdoors & Breaches. You'll also explore machine learning with TensorFlow, ESP32 embedded web servers, machine vision object classification, and electrocardiogram (ECG) biopotential measurement and charting.

This guide contains information for getting started with HackerBox 0055, which can be purchased here while supplies last. If you would like to receive a HackerBox like this right in your mailbox each month, please subscribe at HackerBoxes.com and join the revolution!

HackerBoxes is the monthly subscription box service for hardware hackers and enthusiasts of electronics and computer technology. Join us and live the HACK LIFE.

Content List for HackerBox 0055

  • M5CAM ESP32 Camera Module Kit
  • Backdoors & Breaches Playing Card Deck
  • D20 Twenty-Sided Die
  • USB-C to USB-A Cable
  • Grove 4 Pin to DuPont Breakout Cable
  • AD8232 ECG Module
  • ECG Leads with Adhesive Pads
  • Four-Way USB Breakout Module
  • Low Dropout Linear 3.3V Regulator
  • Female-Female DuPont Jumpers
  • Cosmic Scorpion Hacker Sticker
  • Hax0r Life Hacker Sticker

Some other things that will be helpful:

  • Soldering iron, solder, and basic soldering tools
  • Computer for running software tools

Most importantly, you will need 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.

As always, we request that you review the HackerBoxes FAQ. There, you will find a wealth of information for current and prospective members. Almost all of the non-technical support emails that we receive are already answered in the FAQ, so we really appreciate it if you have a quick look.

Machine Learning With TensorFlow

TF Intro.png

TensorFlow is a free and open-source software library that can be used for machine learning (ML) applications such as neural networks. TensorFlow was developed by the Google Brain team for internal use in both research and production at Google.

Machine Learning represents a new paradigm in programming, where instead of programming explicit rules in a language such as Java or C++, you build a system which is trained on data to infer the rules itself. But what does ML actually look like? In the video series Machine Learning Zero to Hero, AI Advocate Laurence Moroney walks us from a basic Hello World example of building an ML model right up to a very interesting example of computer vision.

Background Material (as presented with HackerBox 0053): This series of four videos on Neural Networks and Deep Learning was inspired by the free online book, Neural Networks and Deep Learning. The web site for the book links to a code repo for the examples in the videos.

M5CAM Module

M5CAM.png

The M5CAM Module is a development board for image processing and recognition. It features an ESP32 system on chip with 4M Flash and 520K RAM. It also features a 2 Megapixel OV2640 camera sensor array. The module supports image transmission via Wi-Fi and it can be programmed and debugged via a built-in USB-C port.

The M5CAM Module comes preloaded with a simple Wi-Fi webcam firmware image. Simply, power up the board via USB-C or GROVE. On your PC or mobile device, connect to a Wi-Fi access point having an SSID starting with m5stack. Once connected, open up a web browser and surf to 192.168.4.1 where you should find video streaming in from the M5CAM.

Online Documentation for M5CAM

TensorFlow Object Classification With M5CAM

TF Classifier.png

Grab this Arduino TensorFlow Object Classifier sketch for ESP32 camera boards.

Install the ESP32 Filesystem Uploader into your Arduino IDE. The ESP32 contains a Serial Peripheral Interface Flash File System (SPIFFS). SPIFFS is a lightweight filesystem created for microcontrollers with a flash chip, which are connected by SPI bus, like the ESP32 flash memory. This plugin for the Arduino IDE supports easily uploading files into the ESP32 filesystem.

Within Arduino IDE tools, select:

  • Board > ESP32 Dev Module
  • Flash > 4MB
  • Partition Scheme > No OTA (2MB APP/2MB SPIFFS)
  • PSRAM > Enabled
  • Port > {USB port associated with M5CAM}

Make some changes in the classifier sketch to support the M5CAM

In ESP32CamClassificationTfjs.ino:
Add you Wi-Fi network's 2.4GHz SSID and Password

In camera_wrap.cpp:
Find // Select camera model
Uncomment the line:
CAMERA_MODEL_M5STACK_PSRAM

In camera_pins.h:
Go to pin define list for CAMERA_MODEL_M5STACK_PSRAM
Change Y2_GPIO_NUM from 32 to 17

Compile and Upload to M5CAM

Use tools > ESP32 Sketch Data Upload to upload files to SPIFF

Open the Arduino IDE Serial Monitor

Hit the Reset Button on the M5CAM

Copy the IP address from the Serial Monitor

Use a browser (on the sam 2.4GHz net) to surf to that IP address

Once the model is loaded, stream video and predict objects. As noted for best performance, predict images of objects like piano, coffee mugs, bottles, etc. You can see a list of objects that have been trained into the classifier here.

Depending upon how the M5CAM is held or mounted, the images may be inverted. If so, experiment with commenting out the "if defined" gating around: s->set_vflip(s, 1); s->set_hmirror(s, 1); in the file camera_wrap.cpp

Backdoors & Breaches Card Game

Card Game.png

Backdoors & Breaches is an Incident Response Card Game from Black Hills Information Security and Active Countermeasures.

Backdoors & Breaches contains 52 unique cards to help you conduct incident response tabletop exercises and learn attack tactics, tools, and methods.

You will find the directions on how to play right here. However, we know you’ll hack and customize the deck of cards to fit your own needs for you and your team or students.

AD8232 Electrocardiogram (ECG)

ECG.png

The AD8232 (datasheet) is an integrated signal conditioning block for ECG and other biopotential measurement applications. It is designed to extract, amplify, and filter small biopotential signals in the presence of noisy conditions, such as those created by motion or remote electrode placement. This design allows for an ultralow power analog-to-digital converter (ADC) or an embedded microcontroller to acquire the output signal.

The AD8232 modules can be purchased from Sparkfun. They have a nice hookup guide for using the module with a basic Arduino board if you have one available.

NOTE: This device is not intended to diagnose or treat any conditions.

If you do not have a basic Arduino board available, it is possible to use the AD8232 ECG with the M5CAM module. They can be connected via the grove connector (IO13 or IO4). Since the grove connector provides 5V and the ECG modules requires 3.3V, a voltage regulator must be used to generate the 3.3V from the 5V rail. The LO- and LO+ pins are not used.

HACK LIFE

outro.png

We hope you are enjoying this month's HackerBox adventure into electronics and computer technology. Reach out and share your success in the comments below or on the HackerBox Facebook Group. Also, remember that you can email support@hackerboxes.com anytime if you have a question or need some help.

What's Next? Join the revolution. Live the HackLife. Get a cool box of hackable gear delivered right to your mailbox each month. Surf over to HackerBoxes.com and sign up for your monthly HackerBox subscription.