By Robin BAKER (Electroguard)
- User Script
- Wifi Browser
- Computer Serial Port
- Computer Software
- My Preferred ESP modules
- Hardware Tips
- Buying Tips
CiccioCB’s Annex Wi-Fi BASIC is a BASIC interpreter designed to run on the ESP-8266 family of wifi ‘System On a Chip’ (SOC) devices.
The ESP-8266 family of devices are smaller than an arduino, but run faster and have more available program memory, plus have integrated wifi.
Real-time wifi editing of interpreted BASIC is much quicker and easier than recompiling and uploading every slight edit using arduino environment.
No compiling is needed, you could Copy and Paste an entire new BASIC program then Save and Run it quicker than you can read this sentence.
The BASIC programming language is one of the easiest to learn and use because it is based on human-readable English language.
Don’t let names fool you though, because BASIC does not mean simplistic, and this version of ‘basic’ from Ciccio (pronounced “Chitch” “eee” “ohh“) is much more than just a Basic interpreter… it is a complete integrated BASIC development ‘system’, with amazing features and capabilities.
The essential heart of the system is the Annex Wi-Fi interpreter firmware, which is a ‘binary’ file that runs on the ESP device processor.
An ascii text file containing a list of ‘human-readable’ instructions which Annex Wi-Fi interprets and acts on as it parses through it.
The firmware runs on ‘portable’ ESP-8266 wifi devices which can be considered as remote ‘Satellites’ – there may be many, in different locations.
(See some ESP modules and hardware tips further down this page)
Communications with the remote ESP satellites devices is done via wifi (radio) using a web browser on computer or smart-phone etc.
Launching (flashing) of the ESP satellites is by a computer-based ‘ground-control’ program called AnnexToolKit.exe which uses a Serial Flasher ‘umbilical cord’ to upload the binary firmware image to the ESP device.
In addition to a Serial Flasher, the Annex ToolKit utility contains a Serial Monitor console, a UDP (network) Control console, a Backup and Restore facility, an HTML Converter utility, an OTA (Over The Air) Update Server, and a File Manager utility for Upload and Download of files between computer and ESP device(s) – the usage of all features will be explained in due course.
After an ESP satellite has been ‘launched’ (flashed) by serial port, it ‘serves up’ some in-built web pages which allow it to be connected to remotely by browser over wifi. The served pages provide a remote script editor and debugger, plus remote OTA firmware updates, thus making the comprehensive ‘ground-control’ computer support ‘tool’ and serial ‘umbilical cord’ no longer essential for continued operation.
The firmware fits into 1Mb of device memory space while leaving sufficient memory remaining for the required SPIFFS file system to hold data.
Case-sensitive, eg: /program/file.bas is a different file to /Program/file.bas or /program/File.bas or /program/file.BAS etc.
1. Restoring a binary image from a larger memory device onto a device with less memory will cause SPIFFS corruption.
It also permits copying just those required files, rather than the full SPIFFS image size even if empty of contents.
The Annex Toolkit File Manager tool now includes ability to upload selected files from zip, and similarly to download selected files to a chosen zip.
This is not intended as a comprehensive hardware device review,
just a mention of some of the hardware I find useful, and why.
Some of the useful features are:
On/Off switch … sounds obvious, but I don’t know of any others with one.
Easily accessible GPIO0 jumper … offering push-on switch replacement.
RGB LED connected to gpio’s 12, 15, 13.
The RGB LED and onboard status LEDs allow easy monitoring of gpio pins without requiring external LEDS and limiting resistors.
Top-mounted breakout pins.
On-board USB UART … my normal method of powering the module, even when portable from a USB solar power bank.
Battery box supplied … but instead of soldering it directly to the module, I solder pins to the module and connect dupont female sockets to the box.
This allows the battery box to be plugged on if needed, or to plug on a rechargeable Lipo instead, or it gives
a 5v pin available from the USB to power external 5v devices.
NOTE: Even though the ESP8266 is a 3.3v device its pins are 5v tolerant and I regularly power 5v modules from the 5v battery pin and connect the modules 5v logic output directly to an ESP pin, always without problems.
All usable ESP pins are broken out, offering 5v & 3.3v pins plus 3 GNDs
It also offers a handy method for quickly plugging on different switches and sensors for trying with projects.
Second favourite is a “Next Evo” produced by TrackerJ,
It has the autoflash feature similar to NodeMCU but it is slimmer and therefore more breadboard friendly.
Plus the pin holes are left vacant, so it can be fitted with long pin header sockets if wished.
Some carefully applied strength can widen the long pins sufficient to fit Wemos D1 Mini shield footprint.
But… what makes this module really useful for me, is the provision for fitting an i2c header socket.
Look at the bottom one shown in the picture and you can see a PCF8591 AD/DA module plugged in and standing up vertically – giving 4 analog inputs (connected to a trimpot, LDR & thermistor) plus a digital to analog converter… and all without any wires. This offers the easiest way for i2c development that I know of.
I bought a couple via email, and when I mentioned the difficulty of finding or ordering them online TrackerJ said that his sales are normally from ‘walk-in’ customers… so I don’t know if they will be available online.
Another useful dev ‘special’ is a single-inline module bought from a Greek ebay seller a couple of years ago.
It plugs upright into a breadboard, giving a very narrow footprint, allowing more room for other components.
You can see one resting on the breadboard, and another plugged in above it with components on either side.
All the normal pins are available in a single row for plugging into a breadboard or female header socket.
The UART connections are separate and opposite.
The guy making them was also advertising them elsewhere, so they may still show up in an online search.
I’m not a fan of the relatively chunky NodeMCU, but the version with integral OLED offers a handy self-contained on-screen display for output.
The Wemos D1 Mini is the NodeMCU baby brother with a more practical footprint and offering a range of plug-on shields, even an OLED display.
A nice feature of NodeMCU and Wemos devices is their easy ‘autoflash’ capability which avoids having to ground gpio0 during reset for flashing.
Just remember than an OTA flash is not an update, it is a new firmware flash which will overwrite existing data. so take a zip data backup first.
Of the other ESP modules I’ve tried, most don’t get used much because they don’t offer a useful advantage.
But perhaps special mention should go to the Wemos D1 arduino look-alike, for its familiar footprint.
Handy for use with arduino prototshields etc, and of course LEDs and jumper wires can plug straight in.
Can be powered by USB, and has simple ‘autoflash’ facility, so offers a useful experimenting platform.
What I DO use a lot of – and deserves special mention – is the wide range of Sonoff/Itead ESP-based products, which are convenient, practical, affordable… and in most cases, usable as-is. If you need to control something using a relay, there is a neat ready-made Sonoff that could do it.
I cut up and join some jumper wires to make a variety of male/female dupont “Y” adapters to allow more than 1 connection to a single pin or skt.
I also do something similar with a couple of 4.7K resistors to make a 3-legged i2c pullup assembly with a common +V connection.
Typical ‘tactile’ momentary push-buttons have a tendency to pop out of breadboards, so I usually connect to a multi-switch module (not a matrix).
While your soldering iron is hot…LEDs are quicker and more convenient to use with an appropriate current limiting resistor already attached.
I have some breadboard-friendly 6 LED modules (can’t understand why they didn’t do 8 LEDs) with integral 1K limiting resistors.
But it is worth pointing out that if for instance I wished to display individual switch status leds for all inputs of an 8 port expander it would either require 8 gpio outputs to have one for each of the leds, or require a second 8 port expander configured specifically as outputs for the leds.
A more practical alternative could be to use a single gpio pin to address as many neo-pixels as I could realistically need (potentially hundreds).
I plan to do a chapter on neo-pixels later, but suffice to say now that a neo-pixel is basically a clever RGB LED plus driver chip with a digital input, plus a digital output for optionally feeding into a following neo-pixel.
Each neo-pixel takes the ‘address’ of its position in the chain, and each is capable of being controlled independently by sending an RGB colour code to its address (or all the chain can be addressed at once).
Neo-pixels are available as single pixels, or in a hard stick of 8, or rings of 8, 12, 16, 24 etc, or wired into strings, or as flexible ‘tapes’ of 1m or more, or 8×8 or 16×32 matrix grids etc… and the digital output of any neo-pixel can be chained into the digital input of any other, irrespective of their styles.
Each and every neo-pixel is individually addressable, and their RGB colour values are all individually controllable between 0 (off) to 255 (full on).
Breadboard power supplies have a USB power input, as do all the ESP devices with onboard USB UARTS, and various other types of modules.
But you’ll probably want to reserve your computer USB port for flashing and serial data, so you may want to buy a few cheap USB chargers – you can buy household mains and car lighter versions for less than a quid.
A USB power bank can be a handy device for powering mobile projects on-the-go.
Some have solar panels for charging during the daytime without needing a mains supply.
Search for Solar Power Bank and you should find some for less than £4 (free postage).
All these sorts of items are available off ebay with free delivery on a slow boat from China for less than it costs to drive to your local supermarket.
If you select “Buy it now” Format then wait for screen refresh, then select “Worldwide” Item Location and wait for refresh, then tick “Free postage” Delivery Option, you will be presented with new items available for sale to other countries at perhaps better exchange rates still with free delivery.
if you enter .99 for example into the Price “to” window then click the “>>” button it will only list any items costing less than a quid.
If a cheap free delivery item is available for about the same price from several sellers, and is cheap enough that I decide to get more than one of them, I have learned not to put all my eggs in the same basket by ordering multiple items from the same seller… if it is free delivery then it doesn’t cost me any more to order only 1 from several different sellers, then if there is a problem with any one item, it won’t affect any of the others.
Similarly I have learned not to order many items at a time from a seller – it doesn’t benefit me if a seller bundles many free delivery items into one bigger package, but it will be worse for me if there is a problem with a bigger package of many items, so I spread them out to be sent individually.
Be aware that there is a growing number of cheating scammers who deliberately undercut prices to grab the cash flow without any intention to supply. You could be waiting several weeks for a delivery that never comes, then eventually be forced to seek re-imbursement from ebay.
But you can usually spot such scammers simply by looking at their total transactions… I would rather pay the going rate to a seller with a rating of tens of thousands rather than risk being conned by a deliberate scammer with a rating of less than 2000 because of trying to save a few pennies.
So if you’ve had good dealings with a seller, go back to him knowing he’s genuine, rather than risk penny-pinching to slightly cheaper unknowns.
Occasionally some items don’t work, occasionally some don’t arrive, but the paypal money back guarantee means you never need to lose out.
If you do need to escalate a problem to ebay you have a realistic expectation of receiving satisfaction, which is more than you may get elsewhere.
Ali express does not impose an ‘honesty’ feedback system on their sellers, and has more financial incentive to favour their sellers rather than the victims, therefore dishonest sellers with no reputation to protect and little fear of reprisal can (and some do) openly lie and cheat to ‘rip off’ buyers knowing there is nothing their victims can do about it. So don’t be tempted by prices that are too good to be true, because they may cost you dear.
Wherever you buy from, any ripoff scammer who is deliberately baiting a honey trap can obviously under-cut the best prices of all genuine sellers.
- But when all is said and done, it is astonishing what cheap hi-tech devices and modules we can buy sent free delivery from around the world.