Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

ESP32 Release candidate version

1,091 views
Skip to first unread message

cicciocb

unread,
Nov 26, 2019, 4:31:24 PM11/26/19
to Annex WiFi RDS
Hi All,
I'm almost ready to release an Annex version for the ESP32.

Before the final release, I would like to try again a kind of beta phase, even if that was not a real success for the ESP8266 version.
Ideally I would like to have people testing it and reporting regularly on the group.

In addition, I have some spare PCB developed for this project and I plan to give them for free to the best contributors

So, let me know who is interested into the testing and how he would like to contribute.

cicciocb

Lizby

unread,
Nov 26, 2019, 5:21:14 PM11/26/19
to Annex WiFi RDS
I'd very much like to beta test ESP32 Annex. I've been looking forward to it since Annex for the  ESP8266 was announced. I also have a PCB which I would like to test for the first time, with LCD, micro SD module, I2C port for expansion with the MCP23017 i/o module, and setup for an expansion board for reading 8 DS18B20 temperature sensors.

ESP32_D1mini_LCD1.jpg

I've been anticipating the combination of more I/Os and the ease of development of Annex.



PeterN

unread,
Nov 26, 2019, 6:37:45 PM11/26/19
to Annex WiFi RDS
Hello CiccioCB

that's good news!

Since I have an M5fire-stack and two standard ESP32 boards, I would be interested in the following:
- Is the M5fire supported by ANNEX32?
- Is additional I2C peripherals of the M5 directly supported, such as the TOF sensor, which can hardly be operated without the manufacturer's libraries?

Therefore I would like to experiment with Annex32 on the M5fire too, if possible.
But in general I'm  interested in controlling NeoPixels, using PWM , DAC , MP3-Output and the hopefully higher processing speed . This is because my WordClocks almost reached the speed limits of the ESP8266 with ANNEX. And on a magnetic levitation project with HAL sensor and PiD controller the ESP8266 together with Annex was too slow - maybe it will work with ANNEX32. 

To what extent I or others can cover the requirements of systematic testing and regular reporting, I don't know exactly - we've discussed this before;-)     A certain test specification might be helpful.
Within my certainly limited possibilities and time for the hobby I would like to participate.

Peter

Bugs

unread,
Nov 27, 2019, 3:17:45 AM11/27/19
to Annex WiFi RDS
I have a single '32 module and have built an interface prototyping board with connectors for OLED, SD card, luxmeter I2C LCD, DHT11 and a muliti-channel ADC module.
Just been waiting for some firmware :-)

My programs usually involve file handling (ASCII and binary) so that would be my main testing area.
Hope you have better response.


cicciocb

unread,
Nov 27, 2019, 5:09:42 AM11/27/19
to Annex WiFi RDS
HI All,
"basically" the ESP32 version is very similar to the ESP8266 one, supporting almost the same external devices.
People that already use Annex will find very easy to switch to the ESP32 version as it shares the same interface and the same external tool.
It shares the same syntax and functions with the ESP8266 except for the additional features and H/W differences.

It is be compatible with 4MB modules and should work also on modules with 16MB of flash.
Instead of SPIFFS, it rely on the use of FATFS, mainly because I found it faster even if it takes more memory.
Both cores are used, mainly the core0 for the WIFI interactions and the core1 for the code.
This enables to run tasks in background, like playing MP3 files.

In addition it has a strong relationship with a TFT ILI9341 touch screen and an SD card with a long list of dedicated GUI features.

It supports the M5Stack architecture and also the PSRAM ( so it can have around 4MBytes of RAM available)
Can play MP3 using a the internal DAC (for M5stack) or using an external DAC for HI-FI quality.

This is the link to the documentation :

The DOC is not really complete and must be cleaned a little bit.
What is still missing is a suite of example programs dedicated to the ESP32, even if 95% of the ESP8266 code runs also on the ESP32.

I should be able to release in next days.

Bugs

unread,
Nov 27, 2019, 5:50:58 AM11/27/19
to annex_w...@googlegroups.com
Thanks for the further information.
The FAT file system (and related commands) is of interest but cannot locate anything in the help file so far.
The link to the M5 stack schematics (in the introduction) will not work for me - either browser refuses or pdf is corrupted.



PeterN

unread,
Nov 27, 2019, 7:06:10 AM11/27/19
to Annex WiFi RDS
CiccioCB. 
Thanks for the further information.
The M5 compatibility makes it VERY interesting!
Maybe you can take a look at the TOF sensor, which seems very interesting, but seems complicated in I2C handling without the original library.

I add the M5 schematics I collected.  
M5-Core-Schematic(20171206).pdf
UNIT_POT.pdf
UNIT_RELAY.pdf
UNIT_RFID.pdf
UNIT_TOF.pdf
UNIT-OPTICAL.pdf
m5go_base.pdf
UNIT_ADC.pdf
UNIT_ANGLE.pdf
UNIT_EARTH.pdf
UNIT_ENV.pdf
UNIT_HEART.pdf
UNIT_IR.pdf
UNIT_LIGHTNESS.pdf

cicciocb

unread,
Nov 27, 2019, 8:32:16 AM11/27/19
to Annex WiFi RDS
Bugs,
about the M5stack documentation, it looks that the link has changed.
However, Peter did a good finding ....

About the FATFS, this is an internal change, the file functions are still the same as the ESP8266.

PeterN

unread,
Nov 27, 2019, 12:19:19 PM11/27/19
to Annex WiFi RDS
Hi CiccioCB
the thoughts begin to rotate around some topics:
With the M5Stack GPIO15 seems to be used for the internal SK6812 NeoPixels .  
Can the pin for NeoPixel-data in Annex32 be freely selected again?
Will that work with SK6812?

cicciocb

unread,
Nov 27, 2019, 12:49:45 PM11/27/19
to Annex WiFi RDS
There is an error in the DOC as the pin can be freely defined so the command NEO.SETUP pin, [nb_led] is valid.

I have never tested but  the SK6812 should be supported because it seems to share the same protocol as the WS2812B

PeterN

unread,
Nov 28, 2019, 2:27:52 PM11/28/19
to Annex WiFi RDS
Hi CicccioCB
I will gladly test the SK6812 in the M5 plus external WS2812b.
I could also try the DAC or audio output and the rest of the integrated M5 peripherals.
It would be interesting to be able to use the cheap external I2C modules for the M5Stack like RFID module and TOF module. However, this requires a lot of work for the integration of the corresponding libraries and commands/functions And I only know one person who could implement this:-)))

cicciocb

unread,
Nov 29, 2019, 3:56:09 AM11/29/19
to Annex WiFi RDS
HI, 
I sent to you all the link for download this preliminary version.
You should not be lost as the flashing tool and the GUI interface is the same as the ESP8266.

The flashing is very simple :
Just use the ESP32 green button.
By default the module is flashed in DIO mode but all the modules I tested works very well also in QIO mode (that is faster).
The serial speed can also be increased up to 3000000 ( an ESP32 wemos mini is flashed in ~13 seconds).

Annex32 supports the m5stack or a TFT and an SDcard wired as described in the documentation.

Let me know

cicciocb


salvatore fusto

unread,
Nov 29, 2019, 4:40:09 AM11/29/19
to Annex WiFi RDS
Hello cicciocb,
can you send me again link for Annex32 tools and docs?
thanks
salvator

PeterN

unread,
Nov 29, 2019, 5:07:48 AM11/29/19
to Annex WiFi RDS
Thanks for the RC-files.

I just installed Annex32 on a NodeMCU-board..
Filesystem was empty and I created /program/default.bas and now HELLO_World.bas is already running.


With the flasher I see again that the CR/LF are missing with me.

ANNEX32_flash.jpg


cicciocb

unread,
Nov 29, 2019, 5:27:29 AM11/29/19
to Annex WiFi RDS
Peter,
it's strange as I don't have the same 


PeterN

unread,
Nov 29, 2019, 5:36:06 AM11/29/19
to Annex WiFi RDS
Very strange! 
My German WIN10??? Earth rays;-))

-------
Just installed ANNEX on M5Stack:

IMG_5789.JPG


cicciocb

unread,
Nov 29, 2019, 8:32:10 AM11/29/19
to Annex WiFi RDS
I'll try to send some demo programs later tonight

Bugs

unread,
Nov 29, 2019, 11:36:40 AM11/29/19
to annex_w...@googlegroups.com
DHT11, OLED, and I2C LCD working no problem.
Struggling to find any info on using a micro-SD card module.
esp32.jpg

Lizby

unread,
Nov 29, 2019, 11:42:07 AM11/29/19
to Annex WiFi RDS
I successfully flashed my ESP32 D1 Mini, but don't see how to set the IP address before flashing to something other than 192.168.4.1. How is that done now?

(I'm also not seeing CR/LF in the log when flashing--not that it matters to me.)

cicciocb

unread,
Nov 29, 2019, 11:47:35 AM11/29/19
to annex_w...@googlegroups.com
Struggling to find any info on using a micro-SD card module.
SD_CS is GPIO04


 

cicciocb

unread,
Nov 29, 2019, 11:49:57 AM11/29/19
to Annex WiFi RDS
I successfully flashed my ESP32 D1 Mini, but don't see how to set the IP address before flashing to something other than 192.168.4.1. How is that done now?

Cannot be done. 

cicciocb

unread,
Nov 29, 2019, 12:03:54 PM11/29/19
to Annex WiFi RDS

PeterN

unread,
Nov 29, 2019, 12:09:11 PM11/29/19
to Annex WiFi RDS

PeterN

unread,
Nov 29, 2019, 12:51:08 PM11/29/19
to Annex WiFi RDS
The 10 internal SK6812-NeoPixel  in M5Stack do work perfectly (GPIO15):.

' neo.setup 15, 10 for i = 0 to 600 NEO.PIXEL i mod 10,i mod 20,30-(i mod 30),20-(i mod 20) wlog i pause 200 next i end
 


Lizby

unread,
Nov 29, 2019, 1:45:53 PM11/29/19
to Annex WiFi RDS
Ok. I connected my PC wifi to 192.168.4.1, connected with the browser, and changed the IP in the Config tab on the browser page. All connected fine now through my wifi.

Lizby

unread,
Nov 29, 2019, 1:49:00 PM11/29/19
to Annex WiFi RDS
I have the SD card working on my PCB (with ESP32 D1 Mini). Using this module: 

Bugs

unread,
Nov 29, 2019, 3:17:34 PM11/29/19
to Annex WiFi RDS
Thanks for the schematic (and the pointer to the previous post where I had asked similar question!).
I will hook my SD module up tomorrow and then start asking more silly questions.
Thanks also PeterN and Lizby - I'll be back...

cicciocb

unread,
Nov 29, 2019, 5:25:59 PM11/29/19
to Annex WiFi RDS
good progress so far .....

PeterN

unread,
Nov 29, 2019, 6:59:05 PM11/29/19
to Annex WiFi RDS
I just played the first MP3 files from SD to M5Stack.
Sounds a bit rusty on the M5 hardware, but it's really fun to make it work that way!

Regarding PLAY.VOLUME:
There's an error in the doc file in the list of commands at the end of the file.....
The command list requires a volume from 0 to 1, while the text section about "PLAY..." describes 0 to 100 in %. 

You did a very good job!   Thanks

ACarvalho

unread,
Nov 30, 2019, 4:28:29 AM11/30/19
to Annex WiFi RDS
Hi,
I'd like to participate in beta testing, although I have no hardware skills.
I think I can contribute to small code tests (as I have tried to do with ESP8266).
I have two small WROOM-32 with 4M flash.
Since I'm on Linux, as I do with ESP8266, I would be using esptool instead of the toolkit.

Bugs

unread,
Nov 30, 2019, 6:35:18 AM11/30/19
to Annex WiFi RDS
Small error in the help file for FILE.DIR - in four places FILES. instead of FILE.

d$ = FILES.DIR$("/html")


  d$ = FILES.DIR$


d$ = FILES.DIR$(“/html/ex*.html”)  ‘ returns all the files starting with the “ex”

d$ = FILES.DIR$(“/html/list.*”)  ‘ returns all the files named list.xxx


Now - having connected and SD card module as recommended - should the files on the card show up automatically or do I have to specify a different path?

Cannot spot any reference in help for SD card.

PeterN

unread,
Nov 30, 2019, 6:56:42 AM11/30/19
to Annex WiFi RDS
Hi Bugs
I am not very shure, but my impression is that the SD module and Card have have to be present while flashing.
That did show my 16Gb-SD card immediately. on My M5Stack with an integrated SD-Modul..
Im not shure as well ... is there a limitation to max 16Gbyte???

Peter

PeterN

unread,
Nov 30, 2019, 7:08:49 AM11/30/19
to Annex WiFi RDS
I forgot to mention:
I then found the Root of the filesystem on the SD-Card, where i instaled e.g. an /MP3 directory

cicciocb

unread,
Nov 30, 2019, 8:14:00 AM11/30/19
to Annex WiFi RDS

Now - having connected and SD card module as recommended - should the files on the card show up automatically or do I have to specify a different path?

Cannot spot any reference in help for SD card.


The SD card must be formatted with FAT32 and is limited to 16GB.
There are no particular folder required, all the files present on the card are accessible with long file names.

The SD card can be connected at any moment and is not required to be installed while flashing.

So, "basically" you can use any SDCARD previously formatted with FAT32.
While is possible to format the internal FATFS disk, for security reasons, it  is not possible to format the SD card from Annex32.

Bugs

unread,
Nov 30, 2019, 8:57:02 AM11/30/19
to Annex WiFi RDS
Thanks Peter,

I re-flashed with SD car attached then rebooted and watched the serial port after reset.
It says "No SD cards found" .

Annex initializing...OK
No SD cards found. Reverts to FFAT

Annex32 WiFi 1.38 beta RC2
(C) ciccioCB 2019

I have double checked wiring and also checked the SD module connected to an Arduino (3.3v) board - which lists both files on the card.
Will triple check wiring but might need to put it to one side and get some different bits working.

cicciocb

unread,
Nov 30, 2019, 9:01:16 AM11/30/19
to Annex WiFi RDS
The flash process for the ESP32 is quite different from the ESP8266 as there is also another tool involved for the creation of the partition table.
For this phase the best is to stick with windows

Lizby

unread,
Nov 30, 2019, 9:49:50 AM11/30/19
to annex_w...@googlegroups.com

Definitely works for me with MISO, MOSI, SCLK, and CS connected to my module.

Bugs

unread,
Nov 30, 2019, 11:15:24 AM11/30/19
to Annex WiFi RDS
Thanks all - 

Tried disconnecting my protoboard and wiring direct from SD module to ESP32 headers with same cable as working with Arduino.
8GB and 16 GB cards - both FAT32.
I'm taking too much forum space with this - the only other SPI module I have is for  RFID so will retire for the moment and maybe obtain some different modules to try.


Lizby

unread,
Nov 30, 2019, 11:23:36 AM11/30/19
to Annex WiFi RDS
I fixed a problem on my PCB with TFT_CS and TFT_D/C, and now I get results--but not what I expected.
[For some reason, the "insert image" button didn't do anything, so I've attached the photos--I try to re-edit to see if I can add it.]
The image on the left shows the poweron/reset message, but with text mirrored and the bottom part of the screen not cleared (not black). The image on the right is the result of the program below--also with text mirrored, not in the orientation I thought I had set, and again with the bottom part of the screen not cleared. Any idea what is going on?

TFT.INIT 1
TFT.FILL 0
pause 3000
TFT.FILL 65000
pause 2000
TFT.FILL 0
pause 2000
tft.print "Hello, Annex World"

annex32_tft01.jpg

cicciocb

unread,
Nov 30, 2019, 12:28:22 PM11/30/19
to Annex WiFi RDS
Remove from the confit page the m5 stack mode.

Lizby

unread,
Nov 30, 2019, 1:46:42 PM11/30/19
to annex_w...@googlegroups.com
Perfect. Set to ILI9341 in browser Config and all working now. Loving this. Code below produces display shown in video.


TFT.INIT 1
TFT.FILL 0
pause 2000
tft.text.pos 0,0
tft.print " Hello, Annex World"
pause 2000
TFT.FILL 255
tft.print " Hello, Annex World"
pause 2000
TFT.FILL 0xff00
tft.print " Hello, Annex World"
pause 2000
TFT.FILL 0xff0000
tft.print " Hello, Annex World"
pause 2000
TFT.FILL TFT.RGB(255,0,0) ' red
tft.text.col TFT.RGB(255,255,255),TFT.RGB(255,0,0)
tft.print " Hello, Annex World"
pause 2000
tft.text.col TFT.RGB(255,255,255),TFT.RGB(0,255,0)
TFT.FILL TFT.RGB(0,255,0) ' green
tft.print " Hello, Annex World"
pause 2000
tft.text.col TFT.RGB(255,255,255),TFT.RGB(0,0,255)
TFT.FILL TFT.RGB(0,0,255) ' blue
tft.print " Hello, Annex World"
pause 2000
TFT.FILL 0
do
  x=rnd(319)
  y=rnd(239)
  c=rnd(65535)
  r=rnd(50)+10
  tft.circle x,y,r,c,c
  pause 100
loop


There's some wonkiness with the circles drawn on the left margin--transparent rectangular areas horizontal across the middle. Don't know what the cause of this may be, but looks like areas not drawn when the beginning point is negative (to the left of the left margin).

Carla Huisman

unread,
Nov 30, 2019, 4:24:58 PM11/30/19
to Annex WiFi RDS
Hello Cicciocb,  Fantastic steps forward!
I very much like to participate in testing the 32 version,  I was looking out for this moment.

Please send me a link to the download area.
I will use an esp32 on D1 mini format and start testing the SDcard interface.
Greatings from Carla / At. 

PeterN

unread,
Nov 30, 2019, 6:07:16 PM11/30/19
to Annex WiFi RDS
Tnx for the code. Same positiv result on an M5Stack display

Lizby

unread,
Nov 30, 2019, 6:28:18 PM11/30/19
to annex_w...@googlegroups.com
Here there are flashing LEDs on an MCP23017 I2C I/O expander:


Here's the code:

' MCP23017_test
' I2C.SETUP 4, 5  ' set I2C port on pins 4-sda and 5-scl--esp8266
I2C.SETUP 21, 22  ' set I2C port on pins 21-sda and 22-scl--esp32

MCP23017 = &h20  ' assumes A2, A1, A0 to GND
'MCP23017 internal registers
IODIRA = 0: IODIRB = 1: IOCONA = 10: OLATA = 20: OLATB = 21
    i2c.WriteRegByte MCP23017,IODIRA,0 ' set direction to output
    i2c.WriteRegByte MCP23017,IODIRB,0 ' set direction to output
  do
    gosub mcp17
    pause 3000
  loop
mcp17:
  print "write to mcp23017"
  wlog "write to mcp23017"
  for i = 1 to 6 
    i2c.WriteRegByte MCP23017,OLATA,&HAA ' &b10101010
    i2c.WriteRegByte MCP23017,OLATB,&HAA ' &b10101010
    PAUSE     1000 
    I2C.WriteRegByte MCP23017,OLATA,&H55 '&b01010101 '  
    I2C.WriteRegByte MCP23017,OLATB,&H55 '&b10101010 '  
    PAUSE     1000 
  Next i 
  I2C.WriteRegByte MCP23017,OLATA,0 ' turn all off
  I2C.WriteRegByte MCP23017,OLATB,0 ' turn all off
  return

PeterN

unread,
Nov 30, 2019, 7:36:32 PM11/30/19
to Annex WiFi RDS
I have successfully tested the 3 front keys and the speaker of the M5Stack with MP3 file and internal/external speech synthesis.

###############
'test buttons A, B, C  and speaker output on M5Stack 
play.setup 0
play.volume 60
a$="/MP3/0010.mp3"
if file.exists(a$) then PLAY.MP3 a$ 
play.volume 40
BUT_A=39
BUT_B=38
BUT_C=37
pin.mode BUT_A,input
pin.mode BUT_B,input
pin.mode BUT_C,input
while 1=1
  a$=""
  if pin(BUT_A)= 0 then a$ ="left"
  if pin(BUT_B)= 0 then a$ ="middle"
  if pin(BUT_C)= 0 then a$ ="right"
  if A$<>"" then
    A$= "Thanks. You pressed the " + A$ + " button!"
    wlog A$
    play.speak A$
    PLAY.VOICE A$, "en"
  endif
wend
end
###############

Lizby

unread,
Nov 30, 2019, 7:53:55 PM11/30/19
to Annex WiFi RDS
I have some questions about serial output. After some fiddling, I see that Tx and Rx (pins 1 and 3) output also to the Serial Console. I was pleased to see that puTTY handled the 3,000,000 baud rate. But some text appears which isn't on the serial console ("Program Running" and "Program Ended"). Is there a way to have no console message appear when you are using SERIAL "Output"?

ESP32_screenshot_serial.jpg

Setup below

ESP32_pcb_serial.jpg



PeterN

unread,
Dec 1, 2019, 3:14:02 AM12/1/19
to Annex WiFi RDS
Good morning
While I have no problems with the html output on a tablet (Android or IOS) and chrome browser, 
the editor does not work there. 
Apparently there are problems with the file selection dialog. It already fails to select the directory.
I can't see this in Annex for ESP8266.
Can anyone confirm this or am I doing something wrong?

cicciocb

unread,
Dec 1, 2019, 3:16:36 AM12/1/19
to Annex WiFi RDS


On Saturday, 30 November 2019 22:24:58 UTC+1, Carla Huisman wrote:

Please send me a link to the download area.

I sent you the link 

Theo

unread,
Dec 1, 2019, 3:59:13 AM12/1/19
to Annex WiFi RDS
Good morning Cicciocb,

I would like to participate in testing the Annex32 tools.
Send me the link please.

Thank you. Theo.

cicciocb

unread,
Dec 1, 2019, 4:27:19 AM12/1/19
to Annex WiFi RDS

cicciocb

unread,
Dec 1, 2019, 5:45:18 AM12/1/19
to Annex WiFi RDS
This is a known issue linked with the HTML <select> managed differently into the mobile version of the browser.

PeterN

unread,
Dec 1, 2019, 6:03:04 AM12/1/19
to Annex WiFi RDS
I am a bit confused because the same Chrome browser (in desktop-modus) on IOS works fine with the editor supplied from Esp8266 (1.39.b8)

cicciocb

unread,
Dec 1, 2019, 6:13:01 AM12/1/19
to Annex WiFi RDS
Annex32 file manager is not the same as the ESP8266

barry winch

unread,
Dec 1, 2019, 9:38:16 AM12/1/19
to Annex WiFi RDS

Hi Cicciocb,


I would be happy to participate in the ESP32 testing

 

Could you send the link?

 

Barry

Bugs

unread,
Dec 1, 2019, 10:02:44 AM12/1/19
to Annex WiFi RDS
I could not wait until January for another microSD card module from China so lashed up an SD card socket and connected directly.
It worked - although it appears to be an either/or situation as all my program files (on the ESP chip) disappeared so default.bas did not run.

Anyway the problem appears to be a conflict with the ESP32/Annex and the commonly sold SDcard module which is pictured.
The card has a tristate chip to cope with possible 5 volt signals and a 3v3 regulator (fed from 5v).
As previously mentioned, this module does work with a 3.3 volt Arduino.
The problem may be that the MISO tri-state output is permanently enabled even when then CS is high.
Disconnecting the enable pin of the chip is beyond my soldering iron bit.
A logic crude analyser trace seemed to show some SD reset commands from the ESP but I gave up as no knowledge of what the comms should be. 

My temporary solution (until January) shown in the other two pics.

hw-125.jpg

sd1.jpg

sd2.jpg




Lizby

unread,
Dec 1, 2019, 12:23:12 PM12/1/19
to Annex WiFi RDS

I found that SD file system or on-ESP32 file system is either/or, so to get back files on module for use with SD, you need to remove SD, reset, download the files, insert SD, reset, upload files. 

PeterN

unread,
Dec 1, 2019, 12:28:47 PM12/1/19
to Annex WiFi RDS
Congratulations!
Gave me some new ideas.
An I really like simple but effective solutions

cicciocb

unread,
Dec 1, 2019, 12:52:11 PM12/1/19
to Annex WiFi RDS
This is incorrect.
The SD or the internal FATFS are mutually exclusive.

Connecting an external SD will simply "hide" the files previously loaded into the internal disk.
This means that the files are never lost, they are simply put "on hold".
This permits to override easily an "internal" program using the SDCARD.


 

cicciocb

unread,
Dec 1, 2019, 1:03:03 PM12/1/19
to Annex WiFi RDS
You can simply use the serial port 2

Lizby

unread,
Dec 1, 2019, 2:38:53 PM12/1/19
to Annex WiFi RDS
Here's an example reading multiple DS18B20s on a single pin.

dim portA(8) = 26,39,35,33,34,5,99,13
'dim portA(6) = 27,25,32,12,17,16


print date$,time$
wlog date$,time$
iPort=7
wlog "pin",portA(iPort),tempr$(portA(iPort))


npins=8 '
8
 
for i = 1 to npins
      wlog i
,portA(iPort),tempr$(portA(iPort),i)
 
next i

wlog
"DONE"


Here's the output:

01/12/19    14:16:42
pin    
13    28ea4379a2160379,283e8a79a21603b0,28c96979a21603d3,28190000242e00c4,28ff641e39badd74,28ff641e3983a252,28ff641e1dc878c9
1    13    26.5
2    13    28.125
3    13    27.6875
4    13    24.625
5    13    28.375
6    13    28.25
7    13    28.1875
8    13    -127
DONE


Setup:

ESP32_pcb_ds18b20s.jpg


I'm not sure why it saw 7 rather than 8 DS18B20s. I tested with my DVM to make sure that all data pins were interconnected. Perhaps one of the DS18B20s is bad--I'd have to test them individually.

This shows how uncalibrated and inconsistant cheap ebay "DS18B20"s are. There is no reason the temperatures should differ as much as they do, since in-spec is supposed to be about .5 degrees C +/-, which should result in a maximum difference of no more than 1 degree C, not 1.75 degrees. Good enough for test purposes, though.


Lizby

unread,
Dec 1, 2019, 2:55:23 PM12/1/19
to annex_w...@googlegroups.com

I'm sorry, I'm not understanding what you are saying is incorrect. I think what I said about removing the SD card, resetting (so you can see the internal files), downloading to PC, re-inserting the SD, resetting, and uploading from PC to SD is the way that I recovered the files that were hidden when I got the SD working. Is this incorrect?

I also didn't take Bugs to be implying that the files were gone, just inaccessible once the SD was recognized.


cicciocb

unread,
Dec 1, 2019, 3:08:14 PM12/1/19
to Annex WiFi RDS
Lizby,
yes you're right, I misinterpreted what you said about resetting ( I was thinking you suggested to re-flash the module)

cicciocb

unread,
Dec 1, 2019, 5:10:30 PM12/1/19
to Annex WiFi RDS
Bugs,
I have the same microSD card module you have and I confirm that is not working with Annex32, even trying to bypass the voltage regulator.

AC36F199-C0A2-46DB-9105-5DDF8872A46D.jpeg
At the opposite, this module works perfectly :54F6A0FD-4D34-43E1-8FD5-27EEDC27B623.jpeg

Lizby

unread,
Dec 1, 2019, 7:45:51 PM12/1/19
to Annex WiFi RDS
On my ESP32 D1 Mini, bare and not connected to anything, GPIO25 appears to have a weak pullup on it. Does anyone have a schematic for the D1 Mini which might show this and perhaps other pins like it?

Also, I had thought that the "H_" spi pins were reserved, but I see that H_SCK, GPIO14, is CS for the TFT. Are the other pins available--12, 13, 15? What is the "H_" designation for--H_MISO, H_MOSI, H_SCK, H_SS?

Bugs

unread,
Dec 2, 2019, 11:02:41 AM12/2/19
to Annex WiFi RDS
Thanks for confirming it is not just my module.

I tried the suggested modification of only enabling MOSI output when CS low but a lot of trouble for no change in the fault.

Apparently the arduino shield by the same manufacturer, Catalex has the improved wiring. (module and shield diagrams attached).

I shall acquire a passive module...


Catalex Shield.jpg
Catalex Module.JPG

PeterN

unread,
Dec 2, 2019, 5:42:56 PM12/2/19
to Annex WiFi RDS
Good evening.
The I2S protocol is used by Play (XXX commands) for audio output, for example, and could be output to an external I2S sound module.
But in a M5Stack device I only see an analog audio amplifier directly connected to GIO25. Thus the internal digital to analog converter (DAC1) seems to be used and not the I2S way. This works well on the M5Stack after a "play.setup 0" (+ a reboot).  On the M5 I can indeed play MP3 files etc.. 

So I suspected that this direct sound output with the internal DAC would also work with a simple ESP32 module (NodeMCU) and an active loudspeaker on GPIO25 ...and found just that thought confirmed in the helpfile.   But if I switch to the internal channel with "play.setup 0" (+ a reboot) and try a "PLAY.SPEAK MYTEXT$" or "PLAY.MP3 MYMP3$ ", then I can't see or hear an analog audio signal at the GPIO25. There is only the digital signal (I2S???) and in the log I see the following which still indicates I2S usage:
Create soundoutput
Player on core 1
i2s begin
1
mp3 stopped

Am I perhaps wrong somewhere with my assumptions. about DAC and I2S? 
Or is there something there that prevents switching to the DAC if the hardware is not an M5?

PeterN

unread,
Dec 2, 2019, 5:57:58 PM12/2/19
to Annex WiFi RDS
I was just looking at the serial monitor on the M5. while paying a MP3.
There I also see the reference to I2S, while the output is certainly not generated via I2S.

cicciocb

unread,
Dec 3, 2019, 4:24:34 AM12/3/19
to Annex WiFi RDS
Following the Peter's questions about the I2S and the MP3 I'll try to explain how it works :

The ESP32 includes 2 I2S blocks that are very versatile.
In particular, the I2S can supply the sound data to an external DAC via the H/W I2S bus OR supply the internal 2 channels DAC.

This means that in both cases, the I2S is involved.

About your testing, you should be able to use an external speaker (or an ear-speaker) connected directly to the GPIO25 and GPIO26.
I tested several times and I must say that the quality is very good, even if the 8 bits generates a little background white noise.

However, using an external audio DAC, the quality is really HI-FI.

Bugs

unread,
Dec 3, 2019, 4:56:06 AM12/3/19
to Annex WiFi RDS


On Monday, 2 December 2019 22:42:56 UTC, PeterN wrote:

So I suspected that this direct sound output with the internal DAC would also work with a simple ESP32 module (NodeMCU) and an active loudspeaker on GPIO25 ...and found just that thought confirmed in the helpfile.   But if I switch to the internal channel with "play.setup 0" (+ a reboot) and try a "PLAY.SPEAK MYTEXT$" or "PLAY.MP3 MYMP3$ ", then I can't see or hear an analog audio signal at the GPIO25. There is only the digital signal (I2S???) and in the log I see the following which still indicates I2S usage:
Create soundoutput
Player on core 1
i2s begin
1
mp3 stopped


Hi Peter,

I only have a 38 pin ESP32 module (not M5 hardware).  If I connect an amplifier to pin 25 and run an MP3 program I hear the MP3 file followed by the simple TTS and then google TTS.
The serial port shows this:-
Program Running
Create soundoutput
Player on core 1i2s begin
1
mp3 stopped
i2s begin
Player on core 1i2s begin
1
mp3 stopped
Program Ended

 

PeterN

unread,
Dec 3, 2019, 5:16:40 AM12/3/19
to Annex WiFi RDS
Good morning
Many thanks to ciccioCB and Bugs for explanations and tests.
So now I am sure that something is wrong in my test scenario and I will try again. 
Maybe it was a little late last night :-))

Bugs

unread,
Dec 3, 2019, 5:57:08 AM12/3/19
to Annex WiFi RDS
Just a clarification of my previous comment.
I said that the SDcard module worked with an Arduino.  This was a standard UNO with Atmega328 chip.
Today I programmed the ESP32 with the Arduino SDcard test sketch and my suspect module worked with that also.  The only wiring difference being CS to GPIO5 instead of GPIO4.
Just for info.

cicciocb

unread,
Dec 3, 2019, 2:01:29 PM12/3/19
to Annex WiFi RDS
Bugs,
following you message, I tried to reduce the SPI speed for the SDCARD and I found that the module works at 10MHz.
So, definitively it can work but is much slower than the "direct" connection (40MHz).

In the next version there will be an auto-sense of the max achievable speed

cicciocb 

PeterN

unread,
Dec 3, 2019, 4:18:18 PM12/3/19
to Annex WiFi RDS
Well, it was actually so late yesterday that I was tricked by the wrong labeling of my NodeMCU board!!!!!!
There are 4 pins marked with "GND"  on my board -- but one of them is actually the "CMD" pin. The label is wrong!
And of all things I had connected the ground line of my small loudspeaker to it.
No wonder that only noise came out.

Today everything works fine with direct DAC-sound at GPIO25!

ESP_-_32_NodeMCU_cropped.jpg


Bugs

unread,
Dec 4, 2019, 6:16:53 AM12/4/19
to Annex WiFi RDS
Ouch!  Nasty one.  I must confess to misreading  the (upside down) CMD as GND before now but your print is quite clearly wrong.

cicciocb

unread,
Dec 4, 2019, 4:46:52 PM12/4/19
to Annex WiFi RDS
Hey guys,
no snags so far ?

I prepared another version that fixes some problems, in particular the SDcard adapter and the support for Android and IOS browsers.

I'll post tomorrow.

ACarvalho

unread,
Dec 4, 2019, 5:13:22 PM12/4/19
to Annex WiFi RDS
Hi,
I've been able to do some testing with issues previously found on ESP8266 and all is ok.
Some code I have runs flawlessly.

These ESP32 release more heat than ESP8266 ... and a lot more memory is available.


PeterN

unread,
Dec 4, 2019, 5:28:39 PM12/4/19
to Annex WiFi RDS
I'm testing an old ESP8266 body now with ESP32 and MAX7219 or TM1637. So far everything ok.
I'm curious about the changes of the SD-Reader.

PeterN

unread,
Dec 4, 2019, 5:42:59 PM12/4/19
to Annex WiFi RDS
Just because I used it in an ESP8266 program that I wanted to run on ESP32 now: Where did the watchdog timer go? Unnecessary with ESP32?

Tinine

unread,
Dec 4, 2019, 6:06:13 PM12/4/19
to Annex WiFi RDS
Hey guys, how is the execution speed compared to the 8266? Like how fast can we toggle an output?

@Peter: Funnily enough, I just recently discovered that TOF device, couldn't believe it is also offered with M5stacks. I was looking at using B4R (BASIC for Arduino) to use their library. Would be super cool if Annex could handle it though.

Carla Huisman

unread,
Dec 4, 2019, 6:08:50 PM12/4/19
to Annex WiFi RDS
Hello cicciocb, (and all),
I installed  the 32 version on a smal mini D1 (nameless Wemos type) board. It runs ok, little testprog's.
I could (paste) load and save a larger (300 line) source, but I could not get an Oled display running
and got an error about the PIN (tone) command, but I have to test further.

Moving from Editor to Config mode caused a "disconnect' and back to Editor, a connect message  in the
serial monitor.
In Config mode it was not possible to save the Name and Pasword info and also not an Autorun filename,
After going from Config (and save names) to Editor and to Config again, all the entered data disappears.

I will test further of course, and try an NodeMCU module later, and spend more time.

Happy greetings, @t.  

cicciocb

unread,
Dec 4, 2019, 6:13:25 PM12/4/19
to Annex WiFi RDS
peter, the wdt is not yet implemented

PeterN

unread,
Dec 4, 2019, 6:20:40 PM12/4/19
to Annex WiFi RDS
@Tinine
Yes, TOF-Sensor would be fantastic!!

Regarding  the speed Help file says: 
So performance-wise, the interpreter is not particularly fast, but it should be fast enough for most tasks you may require. In particular is around 2 times faster than Annex for ESP8266, considering that many tasks can run in parallel without particular performance impact (such as playing music in the background)


Bugs

unread,
Dec 5, 2019, 6:18:08 AM12/5/19
to Annex WiFi RDS
Is there any way of finding the space available for files in the internal memory?

I have been trying to find the limits by adding new files in a loop (and then deleting them).
With the internal file system I eventually reached about 450 files and transferred them to a PC to find the total size of about 840kB.
When the limit is reached, there is no error message when writing the next file but the File Manager page will then disconnect and the serial port shows a reconnect loop e.g.

ws[/ws][1] connectws[/ws][1] disconnectws[/ws][2] 
connectws[/ws][2] error(1002): Invalid UTF-8 in text frame/chmon.bas/ï¾­ÞxV­ºasäfý?4 º« ws[/ws][2] disconnect
ws[/ws][3] connectws[/ws][3] error(1002): Invalid UTF-8 in text framews[/ws][3] disconnect






cicciocb

unread,
Dec 5, 2019, 7:37:00 AM12/5/19
to Annex WiFi RDS


On Thursday, 5 December 2019 12:18:08 UTC+1, Bugs wrote:
Is there any way of finding the space available for files in the internal memory?

The function is FLASHFREE.

PeterN

unread,
Dec 5, 2019, 7:47:29 AM12/5/19
to Annex WiFi RDS
Flashfree was new for me too. Thanks.

I did not find anything about the max number of files, but found that the blocksize may be be pretty large (64K???) so each file consumes a lot of space.
Much more  astonishing for me when reading about SPIFFS me was the fact that a filename has a max of 31 chars INCLUDING THE DIRECTORY NAMES because SPIFFS does not support directories.

Bugs

unread,
Dec 5, 2019, 8:51:58 AM12/5/19
to Annex WiFi RDS
Duh!  I had it in my mind that that was for free memory space for the current program but I can see the word "disk" now.
If I try to save a program when there is not enough disk space there is and error message box which just says "File not saved".
My test program loop (which just creates a single line file with the file name as text) now includes a flashfree test:-
filestoadd=1000
for f=1 to filestoadd
  fl$="/test"& str$(f)
  if flashfree > len(fl$) then
     file.save fl$,fl$
  else
    print "no file space"
    exit for
  endif
next f

I noticed using the Toolkiit+32 that deleting a file in the File manager tab gives the message "Delete files inside the ESP8266. Are you sure?"

PeterN

unread,
Dec 5, 2019, 9:05:12 AM12/5/19
to Annex WiFi RDS
Hi Bugs

i am confused about your  "if flashfree > len(fl$) then"

Does len(fi$) return the length of the file or the STRING???


cicciocb

unread,
Dec 5, 2019, 9:06:12 AM12/5/19
to Annex WiFi RDS
The file system is not based on SPIFFS but on FFAT (all references in the doc to the SPIFFS are not valid, for the moment).
I decided to switch to FFAT because I found it more versatile and much faster than the SPIFFS but I've not enough experience about reliability.
In particular the FFAT enables the long file names and real directories, compared with the SPIFFS.
The flash memory has a limited number of writing cycles  and, for this reason, the FAT block is 4096 bytes (same as the flash chip architecture).
As for the SPIFFS, the library uses a process of Wear Levelling that tries to reduce the write cycles.

I don't know if the logical sector is greater than 4096 but 64K seems too much.


Bugs

unread,
Dec 5, 2019, 9:12:32 AM12/5/19
to Annex WiFi RDS
Sorry Peter, is the length of the string fl$ to be written to the file - which happens to be the same as the filename fl$.
I don't know what the minimum disk size used by a short file - that would be a better check.

Or perhaps the file.save command could become a function returning an error code?

PeterN

unread,
Dec 5, 2019, 9:15:01 AM12/5/19
to Annex WiFi RDS
Ah, that is good. Thanks for clarification

PeterN

unread,
Dec 5, 2019, 9:32:02 AM12/5/19
to Annex WiFi RDS
Hi ciccioCB
# while PWM has completely changed "option.pwm" is still in the help file.

# I know the focus can not be on new commands at the moment but ...
At the moment DAC can be used only for MP3 and WAV but  not for  a " not noisy" digital to analog conversion of separat values as an alternative to PWM.  Would that be a good extension?

PeterN

unread,
Dec 5, 2019, 9:33:15 AM12/5/19
to Annex WiFi RDS
You are right!

Bugs

unread,
Dec 5, 2019, 9:56:07 AM12/5/19
to Annex WiFi RDS
With an empty (apart from a single program) 8GB SDcard, flashfree shows 7939719168 bytes.
After saving 1000 tiny files this drops by 3,2768,000 bytes i.e 32 kB per file.

cicciocb

unread,
Dec 5, 2019, 9:59:45 AM12/5/19
to Annex WiFi RDS


On Thursday, 5 December 2019 15:56:07 UTC+1, Bugs wrote:
With an empty (apart from a single program) 8GB SDcard, flashfree shows 7939719168 bytes.
After saving 1000 tiny files this drops by 3,2768,000 bytes i.e 32 kB per file.

This is function on how the SD has been formatted 


Bugs

unread,
Dec 5, 2019, 10:10:07 AM12/5/19
to Annex WiFi RDS
Ah - how one forgets (DOS)!
Re-formatted with 2048 byte blocks and flashfree now shows much reduced usage i.e about 2079 bytes per file.

Lizby

unread,
Dec 5, 2019, 6:39:43 PM12/5/19
to annex_w...@googlegroups.com
I successfully flashed rc3.

Exactly how should an external speaker or earbuds be connected? I have pin 25 to tip on an earbud mini-stereo plug, and 0V to ring. The Serial Monitor shows an appropriate runtime:
Create soundoutput
Program Running
playing FireballMail.mp3 18:30:01
Player on core 1
i2s begin
1
mp3 stopped
I get no sound from the earbuds.
Here is the program. (I ran "play.setup 0" in the immediate window.)
pause 1000
wlog "playing FireballMail.mp3",time$
print "playing FireballMail.mp3",time$
play.mp3 "/FireballMail.mp3"
do 
loop

PeterN

unread,
Dec 6, 2019, 3:26:47 AM12/6/19
to Annex WiFi RDS
That's what I did. (Finaly with the good GND-pin)
My son would say: "Pump up the volume!"


As it plays in background, I omitted the loop

play.setup 0
play.volume 80
a$="/x.mp3"
if file.exists(a$) then PLAY.MP3 a$
'PLAY.NETWORKS"http://91.121.159.124:8000/eko-des-garrigues-128k.mp3"

end

Bugs

unread,
Dec 6, 2019, 5:48:07 AM12/6/19
to Annex WiFi RDS
Hi Lizby,

I had a problem when I first tried using the play mp3 file command as I did not have an sdcard connected so when I uploaded the  6.6MB mp3 file it obviously did not fit in the available flash memory. It just played the first drumbeat.

I pasted your program and did the immediate command. Only changed the filename to suit. It worked as expected with the wiring as you used.

Lizby

unread,
Dec 6, 2019, 12:25:15 PM12/6/19
to Annex WiFi RDS
Thanks, PeterN and Bugs, for confirming that what I was doing should have worked. I had it plugged into my PCB. I unplugged it and hooked up RING to 0V and SLEEVE and TIP to pin 25 on my earbuds, and it played quite nicely.
play.setup 0
pause 1000
wlog "playing cherokeeshuffle.mp3",time$
print "playing cherokeeshuffle.mp3",time$
play.volume 80
a$="/cherokeeshuffle.mp3"
if file.exists(a$) then PLAY.MP3 a$
'play.mp3 "/cherokeeshuffle.mp3"
end
So I've got something wrong on my PCB. Oddly, I couldn't get sound out of a Logitech X100 speaker with the AUX input. The speaker works fine with that cable from my laptop.

Another win for Annex32. Looking very good so far. I'm still trying to work out which pins are best used for which functions.

Should this DAC stereo module work with Annex32 and pins 25 and 26?


cicciocb

unread,
Dec 6, 2019, 12:30:14 PM12/6/19
to Annex WiFi RDS


On Friday, 6 December 2019 18:25:15 UTC+1, Lizby wrote:

Should this DAC stereo module work with Annex32 and pins 25 and 26?

Yes. Look at the documentation for the wiring. 
It is loading more messages.
0 new messages