ESP8266 programming

If you need a small microprocessor with wifi, you can now program the esp8266 with basic, using an integrated web ide. So you can have the unit at the other end of the building, and as long as its on your wifi , you can monitor, and program, debug it. It uses a version of basic, which isn’t as powerful as Xojo, but still easy to use.
Free to use, but doesnt seem to have a commercial license as yet, but probably available via the developer. I have been playing with the Beta version and its very quick to develop with . Quite fast too if you need a quick IOT device .Good support for lots of peripherals.

https://sites.google.com/site/annexwifi/

can xojo. run on this unit?

no

However, you can use a XOJO app to communicate with them. I have a bunch of ESP-01 modules that I programmed to read whatever comes in their serial ports, and rebroadcast it as UDP packets. I have a XOJO app set up to listen for the the incoming UDP data and log it. Lots of applications for datalogging. I went with UDP rather than TCP for simplicity, and because the data is repeated regularly, so that the loss of the occasional packet doesn’t matter.

wow.

can you share some of your completed project? I just want to know what are the things that this unit can do.

just type “esp8266” or “esp32” in your favorite search engine, and you will get millions of links to IOT projects.

I hope this doesn’t run afoul of the forum’s “discussing competitor’s products” rule. I don’t think it should, because this kind of hardware is not in the same league as that targeted by XOJO. Compared to the Raspberry Pi which XOJO does target, the ESP8266 is way lower on the evolutionary scale—no operating system and almost no peripherals.

For those not familiar with the ESP8266, it’s a microcontroller chip with built-in wifi hardware, and not very much else. It’s ideally suited for an application where you already have the hardware that does everything required, except communicate over wifi. For example, suppose you have an ancient outdoor weather station sitting in your back yard. It reads temperature, humidity, wind speed, etc., and once every 30 seconds it outputs its readings over an antiquated serial output. You’d like to change it from serial to wifi. The ESP8266 is the chip that does it, and does it cheaply.

The most popular way to program the ESP8266 is with the Arduino IDE. If you don’t have it, you can download it from:
https://www.arduino.cc/en/main/software
Then you need to add the ESP8266 package:
https://github.com/esp8266
Installation is quite painless. (At least, it is on a Mac. I can’t comment about other platforms.) Depending on which ESP8266 board you get, you may also need a USB to serial adapter. The super cheap ESP-01 that I used has only serial, and requires the adapter (I already had one, so no big deal), but some other ESP8266 boards come with USB.

For anyone who wants it, I can supply my ESP8266 source code for the UDP data relay application that I mentioned. It’s surprisingly simple, because it just calls built in wifi library routines. As for the XOJO UDP data logger application, it’s based on the UDP example project that comes with XOJO:
/Xojo 2018 Release 3/Example Projects/Communication/Internet/UDPExample.xojo_binary_project
Without any modifications, this XOJO application will display all the incoming data from the remote ESP8266’s. And of course you can adapt it to suit your specific requirements.

FYI, here’s a picture comparing the enormous Raspberry Pi (top) to the little ESP-01 module (bottom):

Using ESPlorer with LUA for my ESP8266 modules.

HI Robert,

Thank you for your full explanation. You wake my sleeping brain.

If this is micro-controller, does this mean it should be attached to a computer to work? am I right?

It only needs to be attached to a computer when it’s being programmed. Once the program is loaded into it, then it’s standalone. The program stays in non volatile memory, and whenever it’s powered up it will automatically run the stored program.

Amazing!!!

I just ordered and try.
:slight_smile:

better order a nodemcu to make tests, it has more I/O and an usb plug it’s easier to program
and not really more expensive.
https://www.ebay.com/sch/i.html?_nkw=nodemcu+v3

thank you Jean, this really help a lot too!

using the arduino IDE you can even flash them via wifi ! in such a small and cheap package it’s quite amazing.

I’m too lazy to type this out, but here is a screenshot of the menu for the supported ESP8266 hardware in the Arduino IDE, for the most recent ESP8266 library that I downloaded. Note the WEMOS D1 which is very popular and cheap. It had been recommended to me, and has a USB port. I have a couple of them, but haven’t tested them yet. Also, the NodeMCU, that Jean-Yves mentioned, is also listed.

if you need more power, and bluetooth, and more I/O you can also look at the ESP32 for 1 or 2$ more.
same programming with the arduino IDE.
by the way I HATE the arduino IDE as I compare it to the Xojo IDE …

I agree. The Arduino source code editor is not very good. It’s easier to use another editor to write the source code and then paste it into the Arduino IDE. Yet, the Arduino project has been amazingly good at providing a platform for developing an incredibly wide range of hardware, with surprisingly little effort.

VisualStudioCode can act as a frontend for the Arduino IDE via the Aruduino plugin supplied by Microsoft.
Also take a look at the ‘PlatformIO IDE’ plugin for VisualStudioCode - although I haven’t used it … yet.

PDF :
https://github.com/tttapa/ESP8266/blob/master/A%20Beginner’s%20Guide%20to%20the%20ESP8266%20-%20article/PDF/A-Beginner’s-Guide-to-the-ESP8266.pdf

Online HTML : https://tttapa.github.io/ESP8266/Chap01%20-%20ESP8266.html