Support for Espressif 8266 platform with NodeMCU 1.0 boards


We are getting ready to transition to Helium, we are however using NodeMCU boards on the Espressif 8266 platform with Arduino development framework. Seeing that our boards are not supported by the current Helium Arduino client library, what options do we have if we still want to keep our boards?


Hi @Chege, the Espressif is just another Arduino board as far as the Helium Arduino client is concerned. If you know what pins a serial port is available on you can construct a Helium instance pretty easily.

Look at the Basic example and adapt Board.h to set up the RX and TX pins for the serial port to talk to the Helium Atom.

Let us know if you need help doing that.

PS: I notice you linked to platformio… Excellent stuff! I really like their setup and package management


After running the Basic example with the block below added to Board.h

#elif defined(ESP8266)
#include "SoftwareSerial.h"
#define RX 1
#define TX 2
SoftwareSerial atom_serial(RX, TX);
#define HELIUM_BAUD_RATE helium_baud_b9600

I get the following error.

/Arduino/helium_nodemcuv2/src/helium_basic.ino:34:27: error: no matching function for call to 
Helium  helium(&atom_serial);
/Arduino/helium_nodemcuv2/src/helium_basic.ino:34:27: note: candidates are: In file included from 
.piolibdeps/Helium_ID1719/src/Helium.h:35:5: note: Helium::Helium(HardwareSerial*)
Helium(HardwareSerial * serial);
.piolibdeps/Helium_ID1719/src/Helium.h:35:5: note:   no known conversion for argument 1 from 
'SoftwareSerial*' to 'HardwareSerial*'
.piolibdeps/Helium_ID1719/src/Helium.h:28:7: note: constexpr Helium::Helium(const Helium&)
class Helium
.piolibdeps/Helium_ID1719/src/Helium.h:28:7: note:   no known conversion for argument 1 from 
'SoftwareSerial*' to 'const Helium&'
.piolibdeps/Helium_ID1719/src/Helium.h:28:7: note: constexpr Helium::Helium(Helium&&)
.piolibdeps/Helium_ID1719/src/Helium.h:28:7: note:   no known conversion for argument 1 from 
'SoftwareSerial*' to 'Helium&&'
Compiling .pioenvs/nodemcuv2/FrameworkArduino/WString.o
*** [.pioenvs/nodemcuv2/src/helium_basic.ino.o] Error 1


@Chege so are you really using SoftwareSerial to hook wire the Atom up to the ESP8266? If so, try tweaking the #if defined in Helium.h to check for the ESP8266?

If the use of SoftwareSerial was not what you intended you should be able to use Serial1 talking to the Atom if the pins are available. The pins for the Serial ports on ESP8266 are defined here

Let me know if that is the case and we can push a patch to the Helium file to add a check for the ESP8266.

September 28, 2017 - Talks, blogs, code, hardware, jobs, and more

@marc the Atom should arrive soon, we want to test out the board with the Helium Client so that we can hit the ground running once we receive the kit.

#if defined(ARDUINO_AVR_UNO) || defined(ESP8266) seems do have done the trick, thanks. Replaced both Helium.h and Helium.cpp .

As to why SoftwareSerial and not Serial1,

Serial1 uses UART1, TX pin is GPIO2. UART1 can not be used to receive data because normally it’s RX pin is occupied for flash chip connection.

Since this is a simulation, maybe it would be best to give full feedback once we are setup, it should be any day now. :crossed_fingers:


@marc We got the kit, works very well with the UNO. We have the Helium Arduino Adapter and want to use it with NodeMCUs, are female-female 2.54 to 2.0mm Jumper wires going work? Also do these prototyping modules, have the same pitch as the Helium Adapter?


@Chege, I believe those jumper wires would work. And yeah the prototyping modules have the same pitch since their most commonly used with Arduino (or any XBee style) headers


@marc Thanks, that works! We are now able to use NodeMCU with the Atom.

Those are the only two files we had to change, well plus Board.h for software serial.


Awsome @Chege! Would you be able to share those changes? Either a pull request on the helium-arduino repository or send me the files and I can make the patch there so the community benefits from your changes?


@marc Sure, i’ll create a PR.