Documentation for users switching to Annex and suggestions

Place where find documentation
User avatar
cicciocb
Site Admin
Posts: 2116
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 454 times
Been thanked: 1405 times
Contact:

Re: Documentation for users switching to Annex and suggestions

Post by cicciocb »

Understood. Does it mean that on startup, the ESP will potentially delay up to 25 seconds (while waiting on Wifi connection) before your code starts running?
Yes, except if you select the fast boot option in the config page; in this case the module start to run immediately doing the connection in background.

This has been implemented mainly to kill the wifi connection (doing a WIFI.SLEEP at the beginning) if you want use the module without wifi.
In your case you can just leave as it is and the module will try to connect with the router in background; you can eventually, in the code, check regularly the connection and retry again using WIFI.CONNECT
This "save before run" tip is extremely important and explains why I was confused at some of my experiment code not working (because I didn't save the code in the editor before running, so I was running old unmodified code!
I think to avoid doubt it might be a good idea to:
1. Edit the tooltop text (that appears when mouse is over RUN button) to include "You must SAVE your code before RUN for changes to take effect"
2. Is it possible to have a "CodeHasBeenEdited" flag that is reset by SAVE/SAVEAS button and set by any change in edit window? RUN button would then check flag and if code has been edited but not saved, the editor could ask whether to SAVE then RUN. This would help a lot towards preventing RUN without SAVE after editing code.
Now that you know how to do, is just a question of learning. :D
The only thing I could add is a flag that change as soon you modify something in the code, with a message indicating that you changed something in the code and you should save (or propose automatically to save).
But I don't know if this worth an effort ...

About the ping, it must be used as a function so something like

Code: [Local Link Removed for Guests]

wlog ping(.....)
but I think that it returns always 0 ain immediate mode

p.s.

I'm still curious to understand why you need a 4msec cycle.
Is for filtering or to measure the length of the pulses?
Do you need an action at each pulse or just count is enough?
ByteCounter
Posts: 6
Joined: Sat Apr 13, 2024 3:51 pm

Re: Documentation for users switching to Annex and suggestions

Post by ByteCounter »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Apr 15, 2024 4:20 pm if you select the fast boot option in the config page; in this case the module start to run immediately doing the connection in background. This has been implemented mainly to kill the wifi connection (doing a WIFI.SLEEP at the beginning) if you want use the module without wifi.
In your case you can just leave as it is and the module will try to connect with the router in background; you can eventually, in the code, check regularly the connection and retry again using WIFI.CONNECT
Please add this valuable information to config page (which doesn't explain what "Fastboot" is) and on-line help file.
The only thing I could add is a flag that change as soon you modify something in the code, with a message indicating that you changed something in the code and you should save (or propose automatically to save).
But I don't know if this worth an effort ...
I strongly feel that you should implement this editor change (and also add the tooltip text I mentioned earlier) to the RUN button. This is not mentioned in the on-line help file or on the editor page pop-up help ("Shortcuts help" which might be a good place to mention it).

Also, could the debug window have a tooltip when mouse is over it "Debug output - WLOG output appears here".
I'm still curious to understand why you need a 4msec cycle.
Is for filtering or to measure the length of the pulses?
Do you need an action at each pulse or just count is enough?
Think of being able to run code every 4mS to debounce inputs (over successive interrupts) - if an input is ON for 12mS then it is considered ON (set On_State inputs flags etc that main code can use). Similar behavior for OFF state.
For me, just being able to filter glitches (too short ON/OFF times), set flags and do count of # of times input has been ON will be OK.
ByteCounter
Posts: 6
Joined: Sat Apr 13, 2024 3:51 pm

Re: Documentation for users switching to Annex and suggestions

Post by ByteCounter »

Still doing preliminary steps towards some kind of user guide, when not busy with real life.

Here's a question: What ESP32 boards are you using?
There are many different types of ESP32 boards, with different ESP chips.

I am looking at a few boards:
ESP32 DevKit v1 30-pin boards (has two 15-pin male headers and can plug into a breadboard), see https://www.circuitstate.com/pinouts/do ... reference/
There is a similar ESP32 DevKit board that has 38 pins (two 19-pin headers instead of two 15-pin) but since the extra pins are used to connect the ESP to the flash chip they are unavailable for use and there doesn't to have any advantage to choosing the 38-pin over the 30-pin (unless I'm missing something). For the 30-pin Devkit V1, I'm not sure about the USB isolation diode on this board - is it safe to power from external 5V and have it connected by USB with external power on?
The interesting thing is that there is a board with the same pinout as ESP32 Devkit v1, but with a small OLED 0.96" I2C display on the PCB - Check out ideaspark photos and pinout on this ebay listing https://www.ebay.ca/itm/176053628906 (random listing selected, I don't have any affiliation with seller)

ESP32 D1 mini board (has two rows of pin headers unlike the 8266 D1 mini). See https://www.esploradores.com/wp-content ... pinout.png
I believe this board has an isolation diode between 5V and USB 5V so OK to externally power from 5V and still plug in a USB micro cable.
The two header rows being next to each other make it a little breadboard unfriendly unless you get creative with the kinds of headers and how you solder them.

ESP32-C3-DevKitM-1. This 30-pin board (two 15-pin headers) uses a C3 chip and is available from Espressif (and clones are available from other manufacturers). Although 30-pin, the pinout is different from Devkit v1 boards (but board has a WS2812 RGB LED onboard). See https://docs.espressif.com/projects/esp ... itm-1.html

What are you guys using?
User avatar
Electroguard
Posts: 898
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 291 times
Been thanked: 333 times

Re: Documentation for users switching to Annex and suggestions

Post by Electroguard »

I buy most of my devices because of cost and compatibility.
I cannot afford to spend double digits on devices unless they have something particularly beneficial to offer, so most of the ESPs cost 5 to 8 euros.
I look for Aliexpress sellers who are members of the 6-day or 8-day free shipping groups when spending 10,00€ or more, cos it allows buying cheaper items from different sellers all delivered free to the door in about a week if the combined orders total at least 10,00€

Compatibility is to comply either with wemos footprint shields, or UNO shields, or 44pin ESP32-S3 N16R8 which give max system memory and many gpio''s while also being Annex VGA and USB OTG compatible - there are 2 slightly different 44pin widths to accommode, but with the same pinouts:
[Local Link Removed for Guests]
[Local Link Removed for Guests]

Wemos compatibility only requires the device system pins to align with the system pins of a Wemos D1 Mini ESP8266 pinout, which then allows any wemos shield to be plugged in to it. On most ESP32's this would be 8 pins of the inner rows, whereas on an S2 it is all of the outer rows.
ESP32-S2 wemos footprint [Local Link Removed for Guests]
N16R8 wemos footprint [Local Link Removed for Guests]

Obviously any additional ESP32 pins cannot correspond to the smaller ESP8266 pinout, but that does not matter because all gpio's can easily be re-mapped in the script according to device type being used... I often develop a script barebones on one type of device, then just change a variable so the script runs on a different device that better accommodates the required hardware. I use the arduino digital 'D' pin numbers'' as the constant which is mapped to the relevant devices gpio''s.
devicetype.jpg

And not all pins need to be fully or equally populated anyway, I use long pin headers in the wemos footprint locations so they can be plugged into any wemos footprint device (eg: doubler or tripler), and use female headers in the remaining top locations which still allows easy dupont connection into any of the additional pins. Using coloured headers makes the wemos footprint stand out from the rest. This allows any wemos footprint compatible device to be plugged into any wemos accessory, and/or any wemos accessories to be stacked onto any wemos compatible device.

Wemos shields are so cheap and handy that I have designed myself PCB's for use with 44pin ESP32-S3:
[Local Link Removed for Guests]
[Local Link Removed for Guests]
and/or UNO clones:
[Local Link Removed for Guests]

Obviously UNO shields can be plugged directly into into UNO clones, but the clones female headers are also handy for plugging in dupot cables.
4Mb ESP32 UNO clones are available for less than a fiver: https://www.aliexpress.com/item/1005006 ... ry_from%3A
And powerful N16R8 S3's are available for less than a tenner: https://www.aliexpress.com/item/1005006 ... ry_from%3A

ESP UNO Clones have a big variety of shields and other accessories available, making them very versatile: [Local Link Removed for Guests]

All UNO clones have the useful advantage of a DC socket allowing use of any handy DC mains adapter from 7v to 12v.
Or they can have UPS capability by plugging in a battery shield: https://www.aliexpress.com/item/3289027 ... ry_from%3A
You do not have the required permissions to view the files attached to this post.
lyizb
Posts: 101
Joined: Fri Feb 12, 2021 8:23 pm
Has thanked: 43 times
Been thanked: 25 times

Re: Documentation for users switching to Annex and suggestions

Post by lyizb »

I also like the ESP32 D1 Mini, and as soon as Annex32 support for it was declared even designed a PCB [Local Link Removed for Guests] for it with SD card, ILI9341 tft, touch, serial, serial 2 @ 9600, I2C with an MCP23017, various led outputs, 7 DS18B20s, 4 inputs with 100K pullups, and mono audio output using pin 25. Gerbers included at the link.

My favorite now is the S2Mini, of which I recently got 4 from Aliexpress for a little more than $10US, postage included. The outer pins fit the D1Mini footprint, and it works altogether well with another PCB I designed--for the 8266 D1 Mini:
D1 Mini PCBa.jpg
Gerbers:
D1Mini_shield1v2a_2022-04-05.zip
As Electroguard does, I put female or male headers on the inner rows of pins (or outer for the ESP32 D1 Mini) if I need additional I/O.

I also like the S2 and C3 "Zero" designs, and expect to design PCBs for them in the next few months.

I haven't used the larger non-mini, non-zero boards for years.

For home tinkering, it's hard to beat the ESP32 + Annex32 for power, ease of development, and cost.
You do not have the required permissions to view the files attached to this post.
Post Reply