Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Mario Mikočević
#24931
kolban wrote:@burkmurray -- Oooh thanks for that. Based on my picture of the ESP8266-12 found here:

http://neilkolban.com/tech/wiring-up-esp8266s/

What IS the correct order for GPIO5 and GPIO4? I'll test with LEDs as well.

Neil


If you take module with antennae pointed up then GPIO5 is above GPIO4 (thumb-finger method :) ).

--
Mozz
User avatar
By martinayotte
#24936 Oh ! I've almost forget : If you have old ArduinoIDE, there was a bug in TwoWire::begin() where it was still defaulting to GPIO2/GPIO0. It have been fix few weeks ago. To make sure your version has the fix, look Wire.cpp, it should look like this (I've added the comments) :

Code: Select allvoid TwoWire::begin(int sda, int scl){
  default_sda_pin = sda; // this line was missing in older version.
  default_scl_pin = scl; // this line was missing in older version.
  twi_init(sda, scl);
  flush();
}