How to use an ESP8266 in the Arduino IDE

Aidan just shared a new tutorial: “How to use an ESP8266 in the Arduino IDE”



ESP8266

Central Processing Unit

Tensilica L106 32-bit micro controller
80MHz Clock - up to 160MHz
No ROM, must be accessed via external SPI flash
160KB SRAM

Peripheral Support

2 x UART
SDIO
3 x SPI
1 x I2C
1 x I2S
1 …

Read more

I’m a software guy, but interested in IoT devices. I know almost nothing about the physical aspects of electronics. I have purchased a Sonoff ESP2866-based switch that I’d like to flash with different software, and I’ve looked at the following video on how to do it

http://randomnerdtutorials.com/reprogram-sonoff-smart-switch-with-web-server/

I’ve managed to solder the pins to the board, but I don’t know what interface to buy to connect the pins to the USB interface on my computer (a Macintosh, by the way). Any guidance will be greatly received. S t u a r t .

1 Like

Hey Stuart,
Thanks for getting in touch. It sounds like you need an FTDI device capable of connecting your ESP to your Mac and reprogramming it. I’ve never used the Sonoff devices though, so that process might need to be investiagted further. Check this cable out though -

Hi, Aidan

Thanks for the advice. And for the rapid reply. Much appreciated.

I’ve just placed an order for the cable. Fingers crossed.

Thanks, again, and cheers, S t u a r t .

1 Like

Awesome, let us know how you go with the Sonoff device. Don’t forget that you can share the project if you end up getting it working!

Okay, it’s been a while since I started this journey, but I’m back to looking at programming the ESP device again. In the meantime I’ve spoken to a friend who has done some programming of an ESP device using his Mac with some success. My situation is a little different however.

In my friend’s case, his ESP board has a built-in USB port allowing for direct connection to his Mac. In my case the Sonoff board simply exposes the pins for a serial connection to the board. I’ve managed to solder a series of connectors to the Sonoff which will give me access to its programming interface.

I purchased the FTDI cable mentioned earlier in this thread. And this is where I’m now stuck.

I have the following software installed:

  • macOS 10.13.5
  • Arduino 1.8.5 (with the Generic ESP2866 module installed)
  • FTDIUSBSerialDriver 2.4.2 from here
  • (I even installed the D2XXHelper_v2.0.0.pkg just in case, even though I have not installed the D2XX drivers)

When I start the Arduino IDE, and I have the cable plugged in, I see the following choices in the tools > port menu:

  • /dev/cu.Bluetooth-Incoming-Port
  • /dev/cu.XXXiPhone-Wirel

And that’s all there is in there!

I expected to see a virtual port for the new cable listed in the ports menu. (Like I’ve seen in some other videos.)

What am I doing wrong? Can you please point me to a tutorial/video/document/magic incantation which might help with this setup?

Any help will be very gratefully accepted.

Thanks, and cheers, S t u a r t .

Hey Stuart,
I’ve not had any experience with connecting a device to a Mac OS and from what I recall, it’s a little different to normal. Perhaps there’s someone from the community that might’ve dealt with the process on a Mac?