W8TEE Morse Code Tutor '"Simplified" (James Bond '007' Version)


Ken KM4NFQ <km4nfq@...>
 


On Mon, Jul 8, 2019 at 1:31 AM N6WKZ <n6wkz@...> wrote:
>
> What's the best way to extract the .ino and library files out of your .7z zip package? (and where do they go?)
>
> 73
> Phil N6WKZ
>

Greetings,

What IS the '7z' file format?
https://en.wikipedia.org/wiki/7z

What is INSIDE the STMFMorseTutorSimplified007.7z compressed file archive?
On my Debian GNU/Linux system, the 'l' option will list the contents of the archive:

$ 7z l STMFMorseTutorSimplified007.7z

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Intel(R) Core(TM)2 Duo CPU     E6850  @ 3.00GHz (6FB),ASM)

Scanning the drive for archives:
1 file, 17843 bytes (18 KiB)

Listing archive: STMFMorseTutorSimplified007.7z

--
Path = STMFMorseTutorSimplified007.7z
Type = 7z
Physical Size = 17843
Headers Size = 400
Method = LZMA2:96k
Solid = +
Blocks = 1

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2019-07-02 10:37:14 D....            0            0  STMFMorseTutorSimplified007
2019-05-18 10:41:28 ....A        10398        17443  STMFMorseTutorSimplified007/Config.cpp
2019-05-18 10:42:36 ....A         3939               STMFMorseTutorSimplified007/DisplayManagement.cpp
2019-07-02 10:37:14 ....A         5115               STMFMorseTutorSimplified007/EEPROM.cpp
2019-05-18 10:45:16 ....A        10709               STMFMorseTutorSimplified007/Menu.cpp
2019-03-04 09:36:31 ....A         1918               STMFMorseTutorSimplified007/Menu.h
2019-06-05 08:11:08 ....A        10215               STMFMorseTutorSimplified007/MorseTutor.h
2019-05-18 11:02:54 ....A        21516               STMFMorseTutorSimplified007/ProcessCode.cpp
2019-05-18 10:53:54 ....A         1384               STMFMorseTutorSimplified007/RotaryCode.cpp
2019-07-07 09:24:27 ....A        24493               STMFMorseTutorSimplified007/STMFMorseTutorSimplified007.ino
------------------- ----- ------------ ------------  ------------------------
2019-07-07 09:24:27              89687        17443  9 files, 1 folders

From that output you can see that there is 1 folder called STMFMorseTutorSimplified007/
Inside that folder are 9 files:
STMFMorseTutorSimplified007/Config.cpp
STMFMorseTutorSimplified007/DisplayManagement.cpp
STMFMorseTutorSimplified007/EEPROM.cpp
STMFMorseTutorSimplified007/Menu.cpp
STMFMorseTutorSimplified007/Menu.h
STMFMorseTutorSimplified007/MorseTutor.h
STMFMorseTutorSimplified007/ProcessCode.cpp
STMFMorseTutorSimplified007/RotaryCode.cpp
STMFMorseTutorSimplified007/STMFMorseTutorSimplified007.ino

You can start your Arduino IDE and open the file:
STMFMorseTutorSimplified007/STMFMorseTutorSimplified007.ino

When opened in the Arduino IDE, you will see the other files in tabs across the top of the IDE.

You can view and/or edit any of those files by clicking on a tab.
All of these files stay together in the STMFMorseTutorSimplified007 directory.

There are various libraries that the source code needs in order to compile.
The best way to install these libraries is by using the Arduino IDE to do it.
The libraries will be placed in an external directory.

Some of the libraries needed are:
Adafruit-GFX-Library-master.zip from https://github.com/adafruit/Adafruit-GFX-Library
Adafruit_ILI9341-master.zip from https://github.com/adafruit/Adafruit_ILI9341
Rotary-master.zip from https://github.com/brianlow/Rotary

Just put them in your Downloads/ directory and use the Arduino IDE to install them.
The Arduino IDE will install them in an external directory where it can find them.

add-library.png

On my system, the libraries are installed in $HOME/Arduino/libraries/ 
Your system may have slightly different details than mine, so change these instructions
as needed to work on your system. Hopefully helpful?

Regards,
Ken, KM4NFQ "Not Fully Qualified"




jjpurdum
 

Ken:

Nice job of explaining what's in the ZIP file. For others, I have written other Open Source programs and I tend to follow this convention:

    The project's header file will list the download URLs for any libraries that are not part of the standard IDE installation.

For example, in my MCT, you'll find:

#include <stdint.h>
#include <SPI.h>
#include <Adafruit_GFX.h>             // https://github.com/adafruit/Adafruit-GFX-Library   
#include <Adafruit_ILI9341.h>         // Do a DuckDuckGo.com search for these...(I'm done with Google.)
#include <Adafruit_MCP4725.h>
#include <Wire.h>                     // Standard with IDE
#include <Rotary.h>                   // https://github.com/brianlow/Rotary
#include <Time.h>                     // https://github.com/PaulStoffregen/Time
#include <TimeLib.h>
#include <Tone.h>                     // https://github.com/rogerclarkmelbourne/Arduino_STM32 -- Clark's core library. Install it
#include <EEPROM.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "Menu.h"                     // This is our header

I got a little lazy here, but I think most know that Adafruit has multiple libraries. It would be very helpful if anyone who submits an Open Source program would use the same convention as it would save some bandwidth on the supporting Forum group. Ken's work also shows that there are multiple files in the project and many of them are named using the *.cpp (i.e., C Plus Plus) secondary file name. I've explained here before that there are numerous advantages to this multi-file project approach over one huge INO file. (I've seen one INO file that was over 10K!)

Anyway, thanks Ken for taking the time to explain what's in the MCT compressed file.

Jack, W8TEE


On Monday, July 8, 2019, 7:17:11 AM EDT, Ken KM4NFQ <km4nfq@...> wrote:



On Mon, Jul 8, 2019 at 1:31 AM N6WKZ <n6wkz@...> wrote:
>
> What's the best way to extract the .ino and library files out of your .7z zip package? (and where do they go?)
>
> 73
> Phil N6WKZ
>

Greetings,

What IS the '7z' file format?
https://en.wikipedia.org/wiki/7z

What is INSIDE the STMFMorseTutorSimplified007.7z compressed file archive?
On my Debian GNU/Linux system, the 'l' option will list the contents of the archive:

$ 7z l STMFMorseTutorSimplified007.7z

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Intel(R) Core(TM)2 Duo CPU     E6850  @ 3.00GHz (6FB),ASM)

Scanning the drive for archives:
1 file, 17843 bytes (18 KiB)

Listing archive: STMFMorseTutorSimplified007.7z

--
Path = STMFMorseTutorSimplified007.7z
Type = 7z
Physical Size = 17843
Headers Size = 400
Method = LZMA2:96k
Solid = +
Blocks = 1

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2019-07-02 10:37:14 D....            0            0  STMFMorseTutorSimplified007
2019-05-18 10:41:28 ....A        10398        17443  STMFMorseTutorSimplified007/Config.cpp
2019-05-18 10:42:36 ....A         3939               STMFMorseTutorSimplified007/DisplayManagement.cpp
2019-07-02 10:37:14 ....A         5115               STMFMorseTutorSimplified007/EEPROM.cpp
2019-05-18 10:45:16 ....A        10709               STMFMorseTutorSimplified007/Menu.cpp
2019-03-04 09:36:31 ....A         1918               STMFMorseTutorSimplified007/Menu.h
2019-06-05 08:11:08 ....A        10215               STMFMorseTutorSimplified007/MorseTutor.h
2019-05-18 11:02:54 ....A        21516               STMFMorseTutorSimplified007/ProcessCode.cpp
2019-05-18 10:53:54 ....A         1384               STMFMorseTutorSimplified007/RotaryCode.cpp
2019-07-07 09:24:27 ....A        24493               STMFMorseTutorSimplified007/STMFMorseTutorSimplified007.ino
------------------- ----- ------------ ------------  ------------------------
2019-07-07 09:24:27              89687        17443  9 files, 1 folders

From that output you can see that there is 1 folder called STMFMorseTutorSimplified007/
Inside that folder are 9 files:
STMFMorseTutorSimplified007/Config.cpp
STMFMorseTutorSimplified007/DisplayManagement.cpp
STMFMorseTutorSimplified007/EEPROM.cpp
STMFMorseTutorSimplified007/Menu.cpp
STMFMorseTutorSimplified007/Menu.h
STMFMorseTutorSimplified007/MorseTutor.h
STMFMorseTutorSimplified007/ProcessCode.cpp
STMFMorseTutorSimplified007/RotaryCode.cpp
STMFMorseTutorSimplified007/STMFMorseTutorSimplified007.ino

You can start your Arduino IDE and open the file:
STMFMorseTutorSimplified007/STMFMorseTutorSimplified007.ino

When opened in the Arduino IDE, you will see the other files in tabs across the top of the IDE.

You can view and/or edit any of those files by clicking on a tab.
All of these files stay together in the STMFMorseTutorSimplified007 directory.

There are various libraries that the source code needs in order to compile.
The best way to install these libraries is by using the Arduino IDE to do it.
The libraries will be placed in an external directory.

Some of the libraries needed are:
Adafruit-GFX-Library-master.zip from https://github.com/adafruit/Adafruit-GFX-Library
Adafruit_ILI9341-master.zip from https://github.com/adafruit/Adafruit_ILI9341
Rotary-master.zip from https://github.com/brianlow/Rotary

Just put them in your Downloads/ directory and use the Arduino IDE to install them.
The Arduino IDE will install them in an external directory where it can find them.

add-library.png

On my system, the libraries are installed in $HOME/Arduino/libraries/ 
Your system may have slightly different details than mine, so change these instructions
as needed to work on your system. Hopefully helpful?

Regards,
Ken, KM4NFQ "Not Fully Qualified"




Ken KM4NFQ <km4nfq@...>
 

Greetings,

I have no idea if a person who uses MS-Windows or Mac OSX has to purchase a program to unzip a 7z file archive? On my Debian GNU/Linux system, the program is provided by p7zip-full in the Debian repositories ( # apt install p7zip-full ). If you use MS-Windows or Mac OS, you will have to find the program and pay for it, download it, whatever. Don't forget to check your download for malware, whatever, before you open it, right?

To extract a 7z file archive with full paths, use the 'x' option:

$ 7z x STMFMorseTutorSimplified007.7z

The above command will extract all the .cpp, .h, and .ino files to the STMFMorseTutorSimplified007/ directory.

To extract a 7z archive without using directory names, use the 'e' option:

$ 7z e STMFMorseTutorSimplified007.7z

The above command will extract all the .cpp, .h, and .ino files to the directory that the 7z archive is located in when you extract the files. IF the directory the archive is in already has files in it, the un-archived files will be mixed in it. So if you use the 'e' option, you should probably create a new directory, put the archive in it, then extract the files. For example, I created a new directory called mct2/, moved the STMFMorseTutorSimplified007.7z archive to mct2/, then used the 'e' option to open it. Then I renamed STMFMorseTutorSimplified007.ino to mct2.ino because it is shorter, and fits in the Arduino IDE tabs better. But you can do whatever you want to do. I suggest that you use the 'x' option.

That's all there is to it. Leave all the files in that working directory.

Perhaps someone with a Mac OSX system, or a MS-Windows system can give details on where to obtain a program which will extract files from a 7z file archive, and how to use it to extract the files from the STMFMorseTutorSimplified007.7z archive? The above instructions were for a Debian GNU/Linux system.

I am attaching the Morse Code Tutor 2 program files as a standard ZIP file. The difference in size is trivial by today's standards, but most people know how to unZIP a ZIP archive, no matter which operating system they are using. I have also attached an MD5 checksum for the ZIP file. This standard ZIP archive will extract all the archived files in a directory called mct2/. The .ino file has been renamed to mct2.ino as well, for compatibility with the Arduino IDE.

Hopefully helpful?
Regards,
Ken, KM4NFQ "Not Fully Qualified"


On Mon, Jul 8, 2019 at 8:27 AM jjpurdum via Groups.Io <jjpurdum=yahoo.com@groups.io> wrote:
Ken:

Nice job of explaining what's in the ZIP file. For others, I have written other Open Source programs and I tend to follow this convention:

    The project's header file will list the download URLs for any libraries that are not part of the standard IDE installation.

For example, in my MCT, you'll find:

#include <stdint.h>
#include <SPI.h>
#include <Adafruit_GFX.h>             // https://github.com/adafruit/Adafruit-GFX-Library   
#include <Adafruit_ILI9341.h>         // Do a DuckDuckGo.com search for these...(I'm done with Google.)
#include <Adafruit_MCP4725.h>
#include <Wire.h>                     // Standard with IDE
#include <Rotary.h>                   // https://github.com/brianlow/Rotary
#include <Time.h>                     // https://github.com/PaulStoffregen/Time
#include <TimeLib.h>
#include <Tone.h>                     // https://github.com/rogerclarkmelbourne/Arduino_STM32 -- Clark's core library. Install it
#include <EEPROM.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "Menu.h"                     // This is our header

I got a little lazy here, but I think most know that Adafruit has multiple libraries. It would be very helpful if anyone who submits an Open Source program would use the same convention as it would save some bandwidth on the supporting Forum group. Ken's work also shows that there are multiple files in the project and many of them are named using the *.cpp (i.e., C Plus Plus) secondary file name. I've explained here before that there are numerous advantages to this multi-file project approach over one huge INO file. (I've seen one INO file that was over 10K!)

Anyway, thanks Ken for taking the time to explain what's in the MCT compressed file.

Jack, W8TEE


On Monday, July 8, 2019, 7:17:11 AM EDT, Ken KM4NFQ <km4nfq@...> wrote:



On Mon, Jul 8, 2019 at 1:31 AM N6WKZ <n6wkz@...> wrote:
>
> What's the best way to extract the .ino and library files out of your .7z zip package? (and where do they go?)
>
> 73
> Phil N6WKZ
>

Greetings,

What IS the '7z' file format?
https://en.wikipedia.org/wiki/7z

What is INSIDE the STMFMorseTutorSimplified007.7z compressed file archive?
On my Debian GNU/Linux system, the 'l' option will list the contents of the archive:

$ 7z l STMFMorseTutorSimplified007.7z

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Intel(R) Core(TM)2 Duo CPU     E6850  @ 3.00GHz (6FB),ASM)

Scanning the drive for archives:
1 file, 17843 bytes (18 KiB)

Listing archive: STMFMorseTutorSimplified007.7z

--
Path = STMFMorseTutorSimplified007.7z
Type = 7z
Physical Size = 17843
Headers Size = 400
Method = LZMA2:96k
Solid = +
Blocks = 1

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2019-07-02 10:37:14 D....            0            0  STMFMorseTutorSimplified007
2019-05-18 10:41:28 ....A        10398        17443  STMFMorseTutorSimplified007/Config.cpp
2019-05-18 10:42:36 ....A         3939               STMFMorseTutorSimplified007/DisplayManagement.cpp
2019-07-02 10:37:14 ....A         5115               STMFMorseTutorSimplified007/EEPROM.cpp
2019-05-18 10:45:16 ....A        10709               STMFMorseTutorSimplified007/Menu.cpp
2019-03-04 09:36:31 ....A         1918               STMFMorseTutorSimplified007/Menu.h
2019-06-05 08:11:08 ....A        10215               STMFMorseTutorSimplified007/MorseTutor.h
2019-05-18 11:02:54 ....A        21516               STMFMorseTutorSimplified007/ProcessCode.cpp
2019-05-18 10:53:54 ....A         1384               STMFMorseTutorSimplified007/RotaryCode.cpp
2019-07-07 09:24:27 ....A        24493               STMFMorseTutorSimplified007/STMFMorseTutorSimplified007.ino
------------------- ----- ------------ ------------  ------------------------
2019-07-07 09:24:27              89687        17443  9 files, 1 folders

From that output you can see that there is 1 folder called STMFMorseTutorSimplified007/
Inside that folder are 9 files:
STMFMorseTutorSimplified007/Config.cpp
STMFMorseTutorSimplified007/DisplayManagement.cpp
STMFMorseTutorSimplified007/EEPROM.cpp
STMFMorseTutorSimplified007/Menu.cpp
STMFMorseTutorSimplified007/Menu.h
STMFMorseTutorSimplified007/MorseTutor.h
STMFMorseTutorSimplified007/ProcessCode.cpp
STMFMorseTutorSimplified007/RotaryCode.cpp
STMFMorseTutorSimplified007/STMFMorseTutorSimplified007.ino

You can start your Arduino IDE and open the file:
STMFMorseTutorSimplified007/STMFMorseTutorSimplified007.ino

When opened in the Arduino IDE, you will see the other files in tabs across the top of the IDE.

You can view and/or edit any of those files by clicking on a tab.
All of these files stay together in the STMFMorseTutorSimplified007 directory.

There are various libraries that the source code needs in order to compile.
The best way to install these libraries is by using the Arduino IDE to do it.
The libraries will be placed in an external directory.

Some of the libraries needed are:
Adafruit-GFX-Library-master.zip from https://github.com/adafruit/Adafruit-GFX-Library
Adafruit_ILI9341-master.zip from https://github.com/adafruit/Adafruit_ILI9341
Rotary-master.zip from https://github.com/brianlow/Rotary

Just put them in your Downloads/ directory and use the Arduino IDE to install them.
The Arduino IDE will install them in an external directory where it can find them.

add-library.png

On my system, the libraries are installed in $HOME/Arduino/libraries/ 
Your system may have slightly different details than mine, so change these instructions
as needed to work on your system. Hopefully helpful?

Regards,
Ken, KM4NFQ "Not Fully Qualified"




bobolink <rwhinric@...>
 

Thank you Ken.
".zip" is an extension that even my Mac understands ;-)
And thanks for your work on the files.

bob
wm6h


Ken KM4NFQ <km4nfq@...>
 

On Mon, Jul 8, 2019 at 10:11 AM bobolink <rwhinric@...> wrote:

Thank you Ken.
".zip" is an extension that even my Mac understands ;-)
And thanks for your work on the files.

bob
wm6h
Hello Bob, WM6H,

You're welcome! Please let me know how it works for you. Can you open
it okay in the Arduino IDE on your Mac? Does everything look okay?
Feedback is encouraged and welcomed.

Regards,
Ken, KM4NFQ "Not Fully Qualified"


bobolink <rwhinric@...>
 

Looks good.
Downloaded Arduino IDE 1.8.9 this morning.

Small problems.
Arduino: 1.8.9 (Mac OS X)
uint16 --> uint16_t

That sort of thing.
No big deal. Working through them now.
I'm using a different hardware target which explains most of the issues.
Nothing we can't handle!

bob
wm6h


Ken KM4NFQ <km4nfq@...>
 

Thank you, Bob, WM6H,

I'm glad it is working for you.
I think those are the kinds of details people are looking for?
There are at least three systems (Linux, Mac, and MS) that the MCT2
can be built on.
I think that each system presents its own set of "Blue Pill" problems.

Regards,
Ken, KM4NFQ "Not Fully Qualified"

On Mon, Jul 8, 2019 at 10:59 AM bobolink <rwhinric@...> wrote:

Looks good.
Downloaded Arduino IDE 1.8.9 this morning.

Small problems.
Arduino: 1.8.9 (Mac OS X)
uint16 --> uint16_t

That sort of thing.
No big deal. Working through them now.
I'm using a different hardware target which explains most of the issues.
Nothing we can't handle!

bob
wm6h


Tom, wb6b
 

On Mon, Jul 8, 2019 at 07:59 AM, bobolink wrote:
uint16 --> uint16_t
I had the same issue when I used the https://github.com/stm32duino toolchain.

Did not have issues with the https://github.com/rogerclarkmelbourne/Arduino_STM32 toolchain.

I simply added a #define uint16 uint16_t to the top of the file to fix that. There were enough additional issues that I switched to the Roger Clark toolchain, as I had no hardcore reason to use the stm32duino (supposedly official) Arduino toolchain. I also have STM developer boards for client projects, but I tend to use STM32Cube, rather than Arduino, with those. 

Don't know if you are still in the STM32 family or porting to another processor altogether.

Tom, wb6b


bobolink <rwhinric@...>
 

Tom,
Don't know if you are still in the STM32 family or porting to another processor altogether.
Another processor altogether. ESP32. Which is kind of a waste as I’m not using the onboard radios at all. All I really expect to salvage is Jack’s “game logic” and expertise in Morse code teaching methods.

Bob


jjpurdum
 

Bob:

Actually, I started the Morse Code Tutor several years ago, but went back to it and modified it for the STM32 for the FDIM talk. I made that swtich not so much for the performance aspects of the STM32 (Blue Pill), but for its additional SRAM space compared to the Nano (i.e., 10x) Since then, I've been playing with the ESP32 myself and really like it. In fact, Al (AC8GY) and I liked it enough that we went back in the chapters of the new Projects book and added it and we're using it in several projects. For those who are not familiar with the various microcontroller, this table from the book shows the important differences:

Resource

Arduino Nano

Teensy 3.6

Blue Pill

ESP32 WROOM 32

Processor bits

8

32

32

32

Flash1

32K

1Mb

64K - 128K

1.3Mb5

SRAM

2K

256K

20K

380Kb5

EEPROM

1K

4K2,3

?3

?3

Processor Clock speed

16MHz

180MHz4

72MHz

240MHz

I/O pins

14

58

26

25

Interrupts

All 14 mappable, 2 external

All 58 mappable

All 26 mappable

All 25 mappable

Timers

3 (2 8-bit, 1 16-bit)

19

7

4

SPI

1

1

1

2

I2C

1

4

1

2

DAC resolution (bits)

10

12

12

12

Analog pins

8

25

5

15

Price

$3

$30

$3

$10


The ESP32 also has WiFi and Bluetooth build into it and is based on a dual core architecture. True, it costs a little more, but this thing can really boot-scoot along at 15x that of a Nano. It is overkill for projects that are not processor-intensive or involve a lot of human I/O, but it's programmable in the Arduino IDE so you can leverage everything you already know without messing with another tool chain. I just wish we had "discovered" it earlier...

Jack, W8TEE

On Tuesday, July 9, 2019, 7:24:17 AM EDT, bobolink <rwhinric@...> wrote:


Tom,
Don't know if you are still in the STM32 family or porting to another processor altogether.
Another processor altogether. ESP32. Which is kind of a waste as I’m not using the onboard radios at all. All I really expect to salvage is Jack’s “game logic” and expertise in Morse code teaching methods.

Bob


bobolink <rwhinric@...>
 

Thanks Jack. I’m printing out that chart now.

The floating point performance of the esp32 is, according to this guy, not too great. Even though they have FP in hardware.
But it is my goto processor these days.
Did you know it has a third processor core just for extreme low power?
It’s the Swiss Army knife.

bob
wm6h 


jjpurdum
 

I did not know that. I've only read articles on creating two threads, so assumed that was it.

Jack, W8TEE

On Tuesday, July 9, 2019, 9:54:39 AM EDT, bobolink <rwhinric@...> wrote:


Thanks Jack. I’m printing out that chart now.

The floating point performance of the esp32 is, according to this guy, not too great. Even though they have FP in hardware.
But it is my goto processor these days.
Did you know it has a third processor core just for extreme low power?
It’s the Swiss Army knife.

bob
wm6h 


Daniel Lavin <dan_ll@...>
 

I have found the ESP32 ADC to be so nonlinear and noisy as to be essentially useless.  Even the spec sheet notes a +/-6% unit to unit variation in ADC results before calibration.  If your project depends on an ADC, consider another chip or an external ADC.

On 7/9/2019 9:17 AM, jjpurdum via Groups.Io wrote:

Bob:

Actually, I started the Morse Code Tutor several years ago, but went back to it and modified it for the STM32 for the FDIM talk. I made that swtich not so much for the performance aspects of the STM32 (Blue Pill), but for its additional SRAM space compared to the Nano (i.e., 10x) Since then, I've been playing with the ESP32 myself and really like it. In fact, Al (AC8GY) and I liked it enough that we went back in the chapters of the new Projects book and added it and we're using it in several projects. For those who are not familiar with the various microcontroller, this table from the book shows the important differences:

Resource

Arduino Nano

Teensy 3.6

Blue Pill

ESP32 WROOM 32

Processor bits

8

32

32

32

Flash1

32K

1Mb

64K - 128K

1.3Mb5

SRAM

2K

256K

20K

380Kb5

EEPROM

1K

4K2,3

?3

?3

Processor Clock speed

16MHz

180MHz4

72MHz

240MHz

I/O pins

14

58

26

25

Interrupts

All 14 mappable, 2 external

All 58 mappable

All 26 mappable

All 25 mappable

Timers

3 (2 8-bit, 1 16-bit)

19

7

4

SPI

1

1

1

2

I2C

1

4

1

2

DAC resolution (bits)

10

12

12

12

Analog pins

8

25

5

15

Price

$3

$30

$3

$10


The ESP32 also has WiFi and Bluetooth build into it and is based on a dual core architecture. True, it costs a little more, but this thing can really boot-scoot along at 15x that of a Nano. It is overkill for projects that are not processor-intensive or involve a lot of human I/O, but it's programmable in the Arduino IDE so you can leverage everything you already know without messing with another tool chain. I just wish we had "discovered" it earlier...

Jack, W8TEE

On Tuesday, July 9, 2019, 7:24:17 AM EDT, bobolink <rwhinric@...> wrote:


Tom,
Don't know if you are still in the STM32 family or porting to another processor altogether.
Another processor altogether. ESP32. Which is kind of a waste as I’m not using the onboard radios at all. All I really expect to salvage is Jack’s “game logic” and expertise in Morse code teaching methods.

Bob

Virus-free. www.avg.com


bobolink <rwhinric@...>
 

Esp32 Ultra Low Power (ULP) core made easy (Arduino IDE)
YouTube


Tom, wb6b
 

On Tue, Jul 9, 2019 at 07:21 AM, Daniel Lavin wrote:
ESP32 ADC to be so nonlinear and noisy
That is good to know. I've started to look at the specs for the ESP32 and it looks really impressive. Great reminder to look deeper past the first glossy descriptions. I was considering the ESP32 for some IoT projects that include analog measurements. 

Because the ESP32 requires external memory, it is almost always purchased as a module with the extra support chips included. Is the poor ADC performance inherent in the chip or might it be due to the module manufactures cutting corners on bypass and filter capacitors?

Tom, wb6b


Daniel Lavin <dan_ll@...>
 

The nonlinearity and unit to unit variance are described in the chip datasheet in the ADC section, so it's not the module manufacturer.  To see the noise, set up a resistive divider or a pot and look at the ADC output, preferably using the Arduino IDE serial plotter.  Even with a heavy bypass cap, I saw roughly +/- 5% noise.  That could be from the module manufacturer and heavy averaging might give an acceptable result, but it's a real issue.

On 7/11/2019 10:44 AM, Tom, wb6b wrote:

On Tue, Jul 9, 2019 at 07:21 AM, Daniel Lavin wrote:
ESP32 ADC to be so nonlinear and noisy
That is good to know. I've started to look at the specs for the ESP32 and it looks really impressive. Great reminder to look deeper past the first glossy descriptions. I was considering the ESP32 for some IoT projects that include analog measurements. 

Because the ESP32 requires external memory, it is almost always purchased as a module with the extra support chips included. Is the poor ADC performance inherent in the chip or might it be due to the module manufactures cutting corners on bypass and filter capacitors?

Tom, wb6b

Virus-free. www.avg.com


bobolink <rwhinric@...>
 

Here is a discussion (from Espressif)
ADC Calibration
Strange you can’t supply an external reference. Doesn’t Arduino have that?
I wonder if turning off the WiFi helps? WiFi transmissions seem to always draw more current than the designers have accommodated for.

bob
wm6h


Dave VE3LHO
 

On Tue, Jul 9, 2019 at 07:21 AM, Daniel Lavin wrote:

I have found the ESP32 ADC to be so nonlinear and noisy as to be essentially useless.  Even the spec sheet notes a +/-6% unit to unit variation in ADC results before calibration.  If your project depends on an ADC, consider another chip or an external ADC.

Interesting. I have heard that many of the BluePill modules also have poor ADC results (datasheet 12b but an ENOB of ~8).
Does anyone have any experience with the BluePill ADC in more "demanding" uses?


Dave VE3LHO
 

Jack,

A couple of minor comments:
I assume you mean ADC not DAC resolution?
I think a Teensy3.6 has 3 SPI.

FWIW there are also lots of other parameters which might be of interest: e.g. does a module actually have a DAC? But those are often pretty use case specific. I think you've got a reasonable set in this table.

Dave L.


jjpurdum
 

Yes, you're right, and most do not have it.

Jack, W8TEE

On Thursday, July 11, 2019, 1:05:09 PM EDT, Dave VE3LHO <dave@...> wrote:


Jack,

A couple of minor comments:
I assume you mean ADC not DAC resolution?
I think a Teensy3.6 has 3 SPI.

FWIW there are also lots of other parameters which might be of interest: e.g. does a module actually have a DAC? But those are often pretty use case specific. I think you've got a reasonable set in this table.

Dave L.