Introduction: HackerBoxes 0015: Connect Everything
CONNECT EVERYTHING: This month, HackerBox Hackers are exploring the newly introduced ESP32. With dual core processor, Wi-Fi, and Bluetooth, the ESP32 shows incredible promise for connecting all the things. This Instructable contains information for working with HackerBoxes #0015. If you would like to receive a box like this right to your mailbox each month, now is the time to subscribe at HackerBoxes.com and join the revolution!
Topics and Learning Objectives for this HackerBox:
- Understanding the features of the Espressif ESP32 SoC
- Programming the ESP32 with ESP-IDF, Arduino, and/or microPython
- Interfacing over I2C to an OLED display matrix
- Controlling a chained ring of RGB LEDs
- Contributing to ESP32 project descriptions
- Biohacking with Caffeine
HackerBoxes is the monthly subscription box service for DIY electronics and computer technology. We are hobbyists, makers, and experimenters. And we are the dreamers of dreams.
Step 1: HackerBoxes 0015: Box Contents
- HackerBoxes #0015 Collectable Reference Card
- ESP32 DevKitC
- OLED Display 0.96inch 128x64 pixels
- Ring of 24 RGB WS2812 LEDs
- Matrix Keyboard 4x4
- Stereo 3.5mm Breakout
- USB to microUSB Cable
- Female-Female DuPont Jumpers 10cm
- Four Pack of Go Cubes
- Exclusive ESP32 Connect Everything Decal
- Exclusive Hack The Planet Branded Decals
Some other things that will be helpful:
- Soldering iron and solder
- Smart Phone or Tablet
- Computer for running development tools
Most importantly, you will need a sense of adventure, DIY spirit, and hacker curiosity. Hardcore hobbyist electronics aren't always easy, but when you persist and enjoy the adventure, a great deal of satisfaction may be derived from persevering and getting your projects working. Just take each step slowly, mind the details, and don't hesitate to ask for help.
Step 2: Biohack With GoCubes Chewable Coffee
To prepare for getting everything connected, let's boot up the wetware.
Yes, Razor and Blade suggest the soft drink of the 3133t h4x0r for those late night hacks, but that was twenty years ago. This month, we contacted the Bro Scientists over at Nootrobox, Inc. and said little more than "Hackers Love Coffee" before we were taking delivery of a heroic load of GoCubes.
Do you really know Caffeine? Despite being legal and readily available, caffeine is a powerful stimulant drug. If you are not a coffee drinker, you might to pass your GoCubes on to a friend.
Another word of warning, this time regarding the taste. While GoCubes look like gummy candy, they do not taste like candy. They taste like real, strong coffee because that is exactly what they are. This realization can be shocking to the mouth, so we suggest realizing it beforehand. Not candy.
Want more? Nootrobox also hooked us up with a special HackerBoxes coupon to share. Biohack the Planet!
Step 3: ESP32 SoC (system on a Chip)
Notice: The ES32 is "the new hotness" and many of the tools and example programs are still in flux. It was no easy feat to get our hacky paws on these DevKits in such a large quantity because they are still mostly being provided to developers. Accordingly, this month the HackerBox call to "bring your hacker spirit" truly becomes a call to action. We have the opportunity to literally create some of the first examples, projects, and explanations for other hobbyists who will be flocking to the ESP32. We will also be doing some pioneering, finding some bugs, and we will need to be extra patient and understanding. Keep an eye on this instructable because it will evolve as our community collectively discovers, and hopefully creates, new opportunities with the Espressif ESP32.
The ESP32 SoC (datasheet) is amazingly small and amazing powerful as we can see in the table comparing the ESP32 to its predecessor, the 8266, and also to a typical Arduino UNO. The ESP32 is very likely to become the go-to chip for electronics hobbyists in the coming months and years.
The ESP32 is a single chip 2.4 GHz Wi-Fi and Bluetooth combo solution. It is highly integrated, requiring less than ten external components. The ESP32 integrates the antenna switch, RF balun, power amplifier, low noise receive amplifier, filters, and power management modules. As such, the entire solution occupies minimal Printed Circuit Board (PCB) area.
Step 4: ESP32 DevKitC Module
Despite being such a new device, the ESP32 is already being integrated into a number of modules and development boards. A current list of these can be found on the ESP32 Wikipedia entry.
Espressif (maker of the ESP32) has provided us with the ESP32-DevKitC based on the ESP-WROOM-32 module. The schematic of the ESP32-DevKitC is shown here.
An ESP32 forum is available for us to stay on the bleeding edge of developments related to this new device.
Step 5: ESP32 IoT Development Framework
The ESP-IDF (IoT Development Framework) is the official development framework for the ESP32 chip. It is still a little cumbersome, but it gets the job done. Follow the link above and scroll to the section titled "Setting Up ESP-IDF" where you can follow the guide specific to your computer's operating system (Linux, OSX, or Windows) to install the IDF. Continue through the steps to building and flashing one or more of the examples.
The Getting Started Guide for the ESP32-DevKitC from Espressif also walks through some examples with the ESP-IDF. It is worth having a look at.
Step 6: Arduino ESP32
Since most of us are very familiar with the Arduino ecosystem and IDE, this may be the easiest way to work with the ESP32. This Arduino extension is still pretty new, so we've run into some glitches, but these should get worked out in near future.
The Arduino ESP32 github repository starts with installation instructions for LInux, OSX, and Windows. Click to that link and follow the instructions that correspond with the operating system on your computer.
This video steps through the process for adding the ESP32 hardware support to the Arduino IDE.
Step 7: MicroPython on the ESP32
Step 8: IoT Weather Widget
Step 9: LED Ring
This project uses the RMT peripheral of the ESP32 to control WS2812 RGB LEDs.
The included LED ring is made up of a chained ring of 24 WS2812B. This ring can, of course, be used with any Arduino using the standard WS2812 libraries. The RMT project can also be used to control the ring from the ESP32. The ESP32 implementation should be extended to support controlling the color or "motion" over bluetooth or an HTTP interface.
Step 10: Keypad
The Arduino Playground Matrix Keypad Tutorial is a good starting point for working with this type of keypad.
Combine with OLED display to implement a simple retro game: SnakeByte, Space Invaders, or the like.
Combine with ESP32 to make an IFTTT (Amazon Dash) Button like this one.
Control the RGB LED ring.
Step 11: Future ESP32 Projects
As we've mentioned, this is only the beginning for the ESP32. We expect to see a flood of projects using this device. Here are some to consider contributing your efforts on:
Leverage the ten capacitive touch inputs of the ESP32.
Generate sound effects, or even stream music, using the DAC outputs of the ESP32 and a 3.5mm audio breakout.
Configure the ESP32 as an MQTT broker.
Implement a Bluetooth to Wi-Fi gateway.
Step 12: Hack the Planet
Thank you for sharing our adventures with the new ESP32 chip. Connect Everything! If you have enjoyed this Instrucable and would like to have a box of electronics projects like this delivered right to your mailbox each month, please join us by SUBSCRIBING HERE.
Reach out and share your success in the comments below and/or on the HackerBoxes Facebook page. Certainly let us know if you have any questions or need some help with anything. Thank you for being part of HackerBoxes. Please keep your suggestions and feedback coming. HackerBoxes are YOUR boxes. Let's make something great!