Tag Archives: ARDUINO AND ESP8266 – A Marriage made in Heaven?

An ESP8266 for Arduino Game Changer?

Arduino(updated 2/4/2015)

Here we go again – just as you thought it was safe to start coding, another game-changer comes along.

This time not only do we have an Arduino IDE for the ESP8266 (which isn’t a stunningly good IDE but it’s awfully familiar to many developers) but also what looks like Arduino library integration.

Do you remember way back in the distance when programming life was simple?

void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
            // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
}

Yes, that long ago.. well that was when programming Arduinos was a doodle, before we discovered the ESP8266-type boards and the unbelievably cryptic commands for port control.

Could all of that be about to change? I just STUMBLED on an article about programming the ES8266 in an Arduino environment. At first this sounded like a backward step, after all the IDE isn’t a patch on the Eclipse environment (IMHO). Anyway I thought I’d investigate. They’ve recently released a new version of the Arduino IDE so I downloaded that and started to investigate. I then found this link

It seems there are a small number of people involved in the development of this – Sandeem Minstry and ivan Grokhotkov – I hope I’ve not missed any names out – but I have to say WELL DONE CHAPS!!!.

In the link above there it seems some had some issues with installation or maybe wanted to use this new tool with their existing Arduino, so a fellow called Roger Clark made a variation – check out his link in the link above. I downloaded the rather large zip file – took out the folder within – and dumped it in the ARDUINO/HARDWARE folder in MY DOCUMENTS.  I restarted the Arduino IDE and went to change the programmer and the device and…

My God it’s Full of Stars

Yup, that worked. I took the standard blink sketch and changed the reference from pin 13 to pin 0 as I was about to test this on an ESP-01.

I can’t tell you how nervous I got as it came to pressing the compile button. I did – and it compiled in about 1 second flat. I put my programming link in, reset the board and…. VOILA – a working BLINK sketch.

But there is FAR MORE to it than this – APPARENTLY it will run the standard Arduino WIFI library – now I CANNOT confirm that as I’ve lost the example code – but if that works – then our struggles with making setup pages are over. And if the MQTT library for Arduino works – well – the SKY is the limit.  I’ve already tried analogWrite(0,128) and that doesn’t work so the NEXT thing is to find some documentation to discover what works and what does not. DELAY() works – at least, it works without setting off the watchdog timer – so those who like LOOPS with DELAYS might be in luck!! No guarantees whatsoever because if you are reading this for the first time, I am only one step ahead of you.

The power, memory and WIFI capacity of the ESP8266 with the vast collection of libraries for the Arduino…  I can tell you… I’m shaking already.

Please do come back with your experiences on this – let’s find out just what we can and what we cannot do with this great new opportunity.

First stop – LCD libraries – I have a GREAT little LCD 240*160 colour display I use for everything but there was no way to convert the library over to ESP8266 – is it even remotely possible I can get this to work in this new environment? The WIFI library works and apparently MQTT works along with simple web page serving – check this out - http://makezine.com/2015/04/01/installing-building-arduino-sketch-5-microcontroller/

Ok so here’s the original link…  https://github.com/sandeepmistry/esp8266-Arduino and instructions as to what works and what doesn’t. They’ve no cracked analogWrite yet but  serial DHT11, onewire, SPI, i2c master… the list goes on.

This just gets better… and better….

Facebooktwittergoogle_pluspinterestlinkedin