ESP8266 - IoT applications written in forth and basic
bob_g4bby
Posts: 412
I've been researching what's available to make IoT devices on ESP8266 and ESP32, for connection to a propeller to provide wifi / front panel features. If the propeller runs Tachyon / Taqoz, then the ESP can send forth commands to the propeller to execute via serial link, as though it was being typed by the user.
For ESP8266 only, Punyforth seems to work well - I've taken the trouble to write a word glossary for it, which is now included on the Github site https://github.com/zeroflag/punyforth. The user terminal can be via serial lnk or telnet. Recommended for high-speed applications.
For ESP8266 and ESP32, Annex Basic is an excellent basic interpreter with very good documentation at https://sites.google.com/site/annexwifi/home. The user interface is all web based, on four pages for Source Editor, Configuration, File manager and Program Output - how neat is that? A lot of the examples stored on the EEPROM are out-of-date, but anything I've written has worked well. Thoroughly recommended for relatively low-speed applications.
There are other interpreters around for Lua and Micropython but they aren't quite as fully developed from an IDE perspective as Annex Basic - but still very usable if you must program in one of those. For faster execution, both ESP8266 and ESP32 can be programmed using the Arduino IDE - but I've never used that, so a much bigger learning curve which didn't seem worth it for now.
It's very easy to make stand-alone programs with either Annex Basic or Punyforth and the controller boards on ebay are dirt cheap.
If your application runs off mains power, then it's worth getting the USB ported ESP8266 or ESP32 with the most pins brought out. However, if you need to run off batteries, it's worth using the devices without USB port. These will go to to sleep with very low standby current (uAs). The USB port type do not turn the USB chip off and continue to draw too much current.
For ESP8266 only, Punyforth seems to work well - I've taken the trouble to write a word glossary for it, which is now included on the Github site https://github.com/zeroflag/punyforth. The user terminal can be via serial lnk or telnet. Recommended for high-speed applications.
For ESP8266 and ESP32, Annex Basic is an excellent basic interpreter with very good documentation at https://sites.google.com/site/annexwifi/home. The user interface is all web based, on four pages for Source Editor, Configuration, File manager and Program Output - how neat is that? A lot of the examples stored on the EEPROM are out-of-date, but anything I've written has worked well. Thoroughly recommended for relatively low-speed applications.
There are other interpreters around for Lua and Micropython but they aren't quite as fully developed from an IDE perspective as Annex Basic - but still very usable if you must program in one of those. For faster execution, both ESP8266 and ESP32 can be programmed using the Arduino IDE - but I've never used that, so a much bigger learning curve which didn't seem worth it for now.
It's very easy to make stand-alone programs with either Annex Basic or Punyforth and the controller boards on ebay are dirt cheap.
If your application runs off mains power, then it's worth getting the USB ported ESP8266 or ESP32 with the most pins brought out. However, if you need to run off batteries, it's worth using the devices without USB port. These will go to to sleep with very low standby current (uAs). The USB port type do not turn the USB chip off and continue to draw too much current.
Comments
Annex also runs on the M5stack products.
Another alternative is B4R if execution speed is an issue.
I compiled a 'blinky' in b4r on an ESP32 successfully. Am I right in thinking that debugging a B4R program is limited to sending log messages via serial link? B4R looks to be a powerful tool with plenty of documentation, libraries and a thriving community. Have you written any code with it?
I have recently received a variety of M5Stack modules that I am anxious to try with B4R. Just a bit swamped with work atm.
Edit: Not sure about the debugging possibilities.