ESP32 rev 1 PCB #esp32


I put together the first ESP32 rev 1 PCB today.
This is one of the boards I ordered from JLCPCB back on Nomember 19.
The PCBs arrived yesterday, after only 23 days.
Five PCBs for $8.49 incl. S&H. However that price was with a $5.00 coupon.

I made a short video of the Morse Tutor playing back a book from the SD card.

Those are the default settings. 13WPM, and 1200Hz Tone.
Ken, KM4NFQ "Not Fully Qualified"


I put the latest and greatest W8BH Morse Tutor on the ESP32.

Arduino IDE 1.8.9
In File > Preferences add:
to Additional Boards Manager URLs and click OK

In Tools > Boards: > Board Manager
find esp32 by Espressif Sysyems and click Install

In Tools > Boards:
find ESP32 Dev Module
and choose it as the Board.

Plug the ESP32-WROOM-32 into a USB port on your PC

Select the proper USB port:
Tools > Port > Serial Ports
and put a check mark in the box.

Open the Source Code for the ESP32 W8BH Morse Tutor.
Edit it if you want to modify anything (callsign, tone, speed, whatever).

Done compiling

I got some errors on my first try. It seems I didn't have pyserial installed.

-----8<-----Cut Here----->8-----
Arduino: 1.8.9 (Linux), Board: "ESP32 Dev Module, Disabled, Default 4MB with spi
ffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600,

Traceback (most recent call last):
Multiple libraries were found for "SD.h"
 Used: /home/alone/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/SD
 Not used: /home/alone/arduino-1.8.9/libraries/SD
Multiple libraries were found for "WiFi.h"
 Used: /home/alone/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WiFi
 Not used: /home/alone/arduino-1.8.9/libraries/WiFi
  File "/home/alone/.arduino15/packages/esp32/tools/esptool_py/2.6.1/"
, line 37, in <module>
    import serial
ImportError: No module named serial
exit status 1
Error compiling for board ESP32 Dev Module.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
-----8<-----Cut Here----->8-----

After installing the pyserial module, everything worked just fine.
I run Debian GNU/Linux 10 "Buster", so the install command was:
# apt-get install python-serial python3-serial

Sketch uses 713494 bytes (54%) of program storage space.
Maximum is 1319720 bytes,
Global variables use 40272 bytes (12%) of of dynamic memory,
leaving 287408 bytes for local variables.
Maximum is 327680 bytes.

The ESP32-WROOM-32 is much easier to get working in the Arduino IDE than the STM32F103C8T6 'Blue Pill', and only slightly less easy than a Mega2560.
Ken, KM4NFQ "Not Fully Qualified"


There is a new update available for the ESP32 Morse Tutor.

Bruce set up the Two Way feature to be full-duplex. That meant that each unit had to make sure that there was nothing to send after each character was received.  That, in turn, made the unit wait between each character received, slowing it down.
Full-duplex is not realistic.  In practice,  I am going to wait until the sender is done before I transmit.   So he changed the code to be half-duplex, with the benefit of being able to receive at full speed.

Ken, KM4NFQ "Not Fully Qualified"


ESP32 Programming Note:
When the Upload starts, and the Connecting with lines and dots appears, press the IO0 button until it connects.
Ken, KM4NFQ "Not Fully Qualified"

Jerry / K0ES


Thanks so much for posting your instructions/guide to getting the ESP32 programmed. I'm a total novice and never would have known what to do without your guidance. 

Jerry / K0ES

John Bahun

Excellent Post - Now if someone could post exact instructions to download the binary to the STM32 (Blue Pill) without having to jump through hoops and just using the Arduino IDE - I would be forever grateful!

73 - John - N6API

Sent from my iPhone 6!
John J. Bahun
Senior Software / Hardware Engineer - Retired (Apple DTS)
Amateur Radio Operator - N6API Extra Class as of 03/05/2019!
CFO Member #046


Hello Jerry, K0ES,

You're welcome. The ESP32-WROMM-32 is much easier to program than an STM32F103C8T6 (Blue Pill).
I use the Debian GNU/Linux operating system. If you are using a different OS, maybe you can share your experiences programming the ESP32 on your system. There is such a variety of OSes that people are using.

Ken, KM4NFQ "Not Fully Qualified"


Hello John, N6API,

I didn't know that the Arduino IDE could be used to program an MCU with a binary blob?
The st-flash utility is much easier to install than the STM32 tool chain.
You can even find pre-compiled binaries for the st-flash utility for some OSes at that site.
Then all you need is an ST-LINK V2 dongle to install the binary.

Once the binary blob is installed on the 'Blue Pill', you can change many things in the Config menu.
The WPM speed can be changed, as well as Farnsworth timing and Wordsworth spacing.
Also the tone can be adjusted. The default 1200Hz is too high for me, so I set it to 600Hz.
If you choose the Callsign menu item, you can key in your callsign which will appear on the splash screen at boot, and also be used in the QSO feature under the Receive menu.

Installing the STM32 tool chain can be a very intense undertaking. I have done it twice on my Linux workstation, and both times were very frustrating experiences. I use the binary blob since I recently reinstalled a new version of Debian on my PC, and I have not installed the STM32 tool chain, yet. As long as Bruce will provide a 'Blue Pill' binary blob for the W8BH Morse Tutor, I see no reason to go through the pain of installing the tool chain a third time. ;-D

Ken, KM4NFQ "Not Fully Qualified"

John Bahun

Hi Ken:

You are right on target about the woes of STM32 on The Arduino IDE. I spent several sleepless nights trying to get the IDE to download the binary to the Blue Pill.

Finally I gave up on the IDE and just used the IDE to compile and link the code and then grab the .bin file and used the STLink tool chain to ram the binary to the Blue Pill using the STLink V2 interface. Surprisingly that method works pretty well.

We have way too many Micros with way too many pin counts with way too many pin configurations!

The ESP32S on the other hand works great with the Arduino IDE but the ESP32 also suffers from different pin outs and numbers of pins.

Maybe someday it will all get worked out!

73 - John - N6API

Sent from my iPhone 6!
John J. Bahun
Senior Software / Hardware Engineer - Retired (Apple DTS)
Amateur Radio Operator - N6API Extra Class as of 03/05/2019!
CFO Member #046


Hello John N6API,

This is my recent experience using the Arduino IDE to make a binary, then uploading that binary to a 'Blue Pill' with the stlink utilities from

I downloaded and installed the STM32CubeProgrammer software
I installed the STM32 .json URL in the Arduino Preferences
I used the Board Manager to install the STM32 boards
I tried to upload MorseTutor.ino

An error occurred while uploading the sketch
Sketch uses 52228 bytes (79%) of program storage space. Maximum is 65536 bytes.
Global variables use 6412 bytes (31%) of dynamic memory, leaving 14068 bytes for local variables.
An error occurred while uploading the sketch not found.
Please install it or add '<STM32CubeProgrammer path>/bin' to your PATH environment:

However, my PATH is updated.
$echo $PATH

Do not close the Arduino IDE !!!
A binary file was created and put in /tmp/arduino_build123456/MorseTutor.ino.bin
The arduino_build###### file numbers change.
I copied that file to my $HOME directory and renamed it mt.bin
If you close the Arduino IDE before you grab the binary file, it disappears.

I plugged a 'Blue Pill' into the USB port connected to an ST-LINK V2 dongle
I used the stlink utilities to flash the 'Blue Pill'
(the '$' is my command-line prompt)

$ st-info --probe
Found 1 stlink programmers
 serial: 553f6806503f49482649013f
openocd: "\x55\x3f\x68\x06\x50\x3f\x49\x48\x26\x49\x01\x3f"
  flash: 131072 (pagesize: 1024)
   sram: 20480
 chipid: 0x0410
  descr: F1 Medium-density device

$ st-flash write mt.bin 0x8000000
st-flash 1.5.1-38-gc3577b5
2019-12-21T09:10:24 INFO common.c: Loading device parameters....
2019-12-21T09:10:24 INFO common.c: Device connected is: F1 Medium-density device, id 0x20036410
2019-12-21T09:10:24 INFO common.c: SRAM size: 0x5000 bytes (20 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 1024 bytes
2019-12-21T09:10:24 INFO common.c: Attempting to write 52536 (0xcd38) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x0800cc00 erased
2019-12-21T09:10:27 INFO common.c: Finished erasing 52 pages of 1024 (0x400) bytes
2019-12-21T09:10:27 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2019-12-21T09:10:27 INFO flash_loader.c: Successfully loaded flash loader in sram
 52/52 pages written
2019-12-21T09:10:31 INFO common.c: Starting verification of write complete
2019-12-21T09:10:32 INFO common.c: Flash written and verified! jolly good!

Jolly Good! I plug the newly programmed Blue Pill into the PCB and away we go.

The screens seem to load slower. Otherwise, it seems to work

So it seems to be possible to do it without having the STM32 tool chain installed?
However, I am not sure why the screens seem to refresh at a much slower rate?

When I use the Morse Tutor binary that Bruce created, the screens refresh properly (much faster).
Ken, KM4NFQ "Not Fully Qualified"