Does anyone have any examples of using an ESP8266-01 with the Electron? I need to add WiFi to the Electron so that it can connect to a local MQTT server that is not connected to the internet. Thanks in advance.
Thanks for the suggestion but that won’t help since both devices are already on a WiFi network together. The only other thing I can think of is having the Electron connected to one of my Wemos (ESP8266) boards and communicate via software serial. I’ve never had any luck sending data between 2 boards though.
How do you want to have the two devices speak with eachother and what kind of data and data rate have you got in mind?
@ScruffR I would like to get the ESP8266-01 working via hardware serial with the Electron. I have another project that uses a service called Blynk that has a library to use the ESP8266-01 as a shield (over serial) with the standard Arduino boards and the Teensy. Obviously it would have to be modified to work with the Electron though. It would work just fine at 9600 baud. The ESP would be making a connection to my MQTT server and then I would be passing string data to that server.
If connecting the ESP8266-01 to the Electron as a “shield” is a no go then my next idea would be to connect the electron to a Wemos D1 mini and transfer string data back and forth via serial. I’ve attempted this before but haven’t had much luck since I can’t send a whole string at once.
I would not see any problem there, but I don’t know what Blynk needs on the Electron side to talk to the ESP via one of the available serial interfaces.
Got a link?
Thanks for taking the time to help and let me know if you need links to anything else.
On a second look, you want to use the ESP8266-01 not to actually act as relay between your Electron and Blynk, but you want to use the Electron’s cellular connection to talk to Blynk and use the ESP as a secondary connection to your non-internet connected WiFi.
So that Blynk library won’t really help you there.
You’d need a “propriatory” protocol implemented on the ESP and the Electron for your own intended communications.
But grabbing some of the ideas Blynk has used for their task should get you started.
And this might be a good read too