Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By penatenjoe
#13449 Attached the code for an example which shows the use of one of the LiquidCrystal_I2C library which can be found in https://github.com/fdebrabander/Arduino ... 2C-library.
Note that the statement Wire.pins has to be added as mentioned in the wiki - this is the only change needed.
You do not have the required permissions to view the files attached to this post.
Last edited by penatenjoe on Sun Apr 05, 2015 5:47 am, edited 1 time in total.
User avatar
By penatenjoe
#13466 I forgot to mention that many LCDs do not work with 3V3 but rather with 5V. My LCD does and in addition has 4k7 pullups to 5V for SDA and SCL. I was concerned that this might damage the pins of the ESP8266 which are not 5V tolerant. Therefore I used a level shifter for both signals . Question to the experts: is that neccessary or is the current too small to cause damage?
User avatar
By erniberni
#13502 Which pins do you use for SDA and SCL?
I can't find any docs about i2c and Arduino IDE ?

I added
Wire.pins(0, 2);
to my sketch. I tried the I2C Scanner of Nick Gammon but Output was nonsense

Regards Reinhard
User avatar
By penatenjoe
#13535 I was using an ESP201 and GPIO13 and 14. On my chip GPIO02 doesn't do anything even with the Blink example in the Arduino examples collection (maybe I fried it?)
The original documentation: http://www.arduino.cc/en/Reference/Wire
Following your hint I tried the I2C scanner (see http://playground.arduino.cc/Main/I2cScanner) but interestingly enough it finds a device under all adresses even with nothing connected to the IO pins. The same code with an original Arduino works just fine. Maybe a bug in the ESP8266 port of the library?