Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By erniberni
#13660
but interestingly enough it finds a device under all adresses even with nothing connected to the IO pins

Same with my code.
I recorded the signals with a logic analyser and they don't look like i2c.
User avatar
By Mikejstb
#13823 I guess I'm struggling with the Arduino environment - thought I understood how to add libraries, etc.
But when I try to compile I get this
Code: Select allArduino: 1.6.1 (Windows 8.1), Board: "Generic ESP8266 board"

Build options changed, rebuilding all

Using library LiquidCrystal_I2C2004V1 in folder: D:\Users\Michael\Arduino\libraries\LiquidCrystal_I2C2004V1 (legacy)

Using library Wire in folder: D:\ESP8266\tools-utilites\arduino-1.6.1\hardware\esp8266com\esp8266\libraries\Wire



D:\ESP8266\tools-utilites\arduino-1.6.1/hardware/tools/esp8266/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -ID:\ESP8266\tools-utilites\arduino-1.6.1/hardware/tools/esp8266/sdk//include -c -Os -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=10601 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -ID:\ESP8266\tools-utilites\arduino-1.6.1\hardware\esp8266com\esp8266\cores\esp8266 -ID:\ESP8266\tools-utilites\arduino-1.6.1\hardware\esp8266com\esp8266\variants\esp01 -ID:\Users\Michael\Arduino\libraries\LiquidCrystal_I2C2004V1 -ID:\ESP8266\tools-utilites\arduino-1.6.1\hardware\esp8266com\esp8266\libraries\Wire C:\Users\Michael\AppData\Local\Temp\build5076188384420751848.tmp\SerialLCD.cpp -o C:\Users\Michael\AppData\Local\Temp\build5076188384420751848.tmp\SerialLCD.cpp.o

SerialLCD.ino: In function 'void setup()':

SerialLCD.ino:19:13: error: no matching function for call to 'LiquidCrystal_I2C::begin()'

SerialLCD.ino:19:13: note: candidate is:

In file included from SerialLCD.ino:1:0:

D:\Users\Michael\Arduino\libraries\LiquidCrystal_I2C2004V1/LiquidCrystal_I2C.h:58:8: note: void LiquidCrystal_I2C::begin(uint8_t, uint8_t, uint8_t)

   void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS );

        ^

D:\Users\Michael\Arduino\libraries\LiquidCrystal_I2C2004V1/LiquidCrystal_I2C.h:58:8: note:   candidate expects 3 arguments, 0 provided

Error compiling.


I got the specified library, unzipped and renamed it and put it in my Arduino/library folder - the new folder is named "LiquidCrystal_I2C" and all the files seem to be there. liquidCrystal_I2c.h is there, etc.

And the library and it's examples show up in the Arduino Files/Examples list.

As a sanity check I loaded a previous mqtt pub/sub project and it builds fine.

It's bound to be something stupid - any suggestions?
User avatar
By Mikejstb
#13824 Interesting - I loaded in the "hello world" project which I had originally used to make sure this Sainsmart 4x20 LCD worked using an Arduino Uno.

I put in the conditional to assign the wire pins and lo and behold it compiles and works. It also uses LiquidCrystal_I2C library but uses "lcd.init() instead of "lcd.begin"

I put "lcd.init" in place of lcd.begin in your code and it too now builds.

Maybe there are different versions of the library lurking in my folders?
User avatar
By Mikejstb
#13884 Here's some pics of my ESP clock project which uses your I2C display and NIST date/time examples rolled into one -
IMG_2158.JPG


IMG_2162.JPG


IMG_2164.JPG


I used an ESP-201, I like them because they're cheap and fairly easy to work with with a non-PC type of project. Also used a 1117 voltage regulator for the ESP 3.3v, and a SainSmart 4x20 I2C LCD display. And some hot glue!
I'm totally useless with enclosures and making a nice finished good looking project.
If anyone has any sources for plastic or acrylic enclosures for little projects like these please let me know.

The ESP-Arduino development environment is sure nice to work in once the little nit picky things of getting everything set up correctly are finished.
You do not have the required permissions to view the files attached to this post.