ESP32 Boot Camp

… for me.

I got a rando e-mail offering me “free parts” and I usually don’t even bother opening the e-mail. It’s ALWAYS garbage right? Well, maybe I hadn’t slept well the night before but I opened it. (psss. You can scroll down about a page before I actually get anywhere in this post…)

What was I thinking? I hovered carefully over the link… seemed pretty safe… short-ish domain ended with a .com .. not extra stuff on the end… OK. They got me. The website was http://digitspace.com — It seemed like an electronics website so I e-mailed. Back…. going back and forth they seem to be running some kind of promotion or perhaps they are trying to build some brand recognition getting bloggers to give them some advertising. In the end selected $50 worth of parts that consisted of two ESP32 micro dev boards that had WiFi (of course), LoRa, OLED display and and extra LED. There was some switch button types but they were a bit more and for some reason I didn’t think I needed them. Well a week later these things actually showed up (and I didn’t have to give them my credit card or paypal info!).

OK THE START..

A week later the boards showed up in the mail.. they look and feel reasonable and they came with some sample firmware that proved they worked. Unfortunately the site did not include any documentation… but I did the “hardwork” for you if you want to follow along… but let’s start with the end… So far I am here:

First thing first I had to add ESP32 support to my Arduino IDE.. I dropped this in the “additional board manager URLs”:

https://dl.espressif.com/dl/package_esp32_index.json

See how in this quick video..

I found a simple tx-rx LoRa code off the internet but I won’t share because it took too much re-work to get working on my board. So I took it’s essience …

I had to add these libraries:

Add libraries:
Adafruit SSD1306 by Adafruit
Adafruit GFX Library by Adafruit
LoRa by Sandeep Mistry

(all came right off the normal library manager)

I couldn’t find an OLED library that worked until reading some and found I liked this one that seemed to be the “best for me”:
https://github.com/osresearch/esp32-ttgo

After that it was smooth sailing. My code is work-in-progress towards my final project. It can be found here: https://github.com/chasihler/TTGO-OLED-RX-TX-HTTP-PUT

Inspiration along the way:

Battery Monitoring: https://github.com/YogoGit/TTGO-LORA32-V1.0

A nice post, read too late, had the correct pinout/board of many different but similar boards: http://brettbeeson.com.au/ttgo-lora-esp32-v2-1-r1-6/

Putting your ESP32 to sleep:
https://randomnerdtutorials.com/esp32-deep-sleep-arduino-ide-wake-up-sources/

My findings were similar … though I haven’t ACCURATELY measured it my USB analyzer says 50mA on and 10mA off.. no peak readings yet but I can live with 10mA in my project.