Chat freely about anything...

User avatar
By trackerj
#10772
hansaya wrote:does anyone have a simple i2c example? I could not get any i2c going.


Maybe this one can help you, I2C driver for MCP9808 Temperature sensor:
http://esp8266-projects.blogspot.com/20 ... basic.html

It is working ok on the new floating point NodeMCU version.
User avatar
By EadF
#10804
reaper7 wrote:
alonewolfx2 wrote:u say tx rx work sda scl. is it same for esp-01? is it mean tx is sda rx is scl for esp-01?

sda/scl pins are defined in include/driver/i2c.h


You could use RX & TX for i2c, but then you would have to disable UART0.
The i2c driver we got so far is software based so it can be made to run on any combination of GPIOs.

Here is an example where i use 8 gpios driving 4 I2C channels at the same time: https://github.com/eadf/esp_mqtt_ports
(There can only be 8 MCP23017 chips per I2C channel)
User avatar
By alonewolfx2
#10829 this is old topic but EadF's work very fantastic. gpio on one esp8266 :)
User avatar
By scargill
#25931 I see no reason why an ESP should not run an LCD and as for reliability, the Espressif SDK and C make a very reliable combination (I'm using SDK 1.30 but it's been fine for some time now). Two problems - the number of pins - and which display - there is a VERY nice 128*160 LCD display on Ebay etc for no more than £3 or £4 and it produces excellent output - I've only ever seen an Arduino library for this and the SPI code etc means it would be somewhat less than trivial to convert to run on an ESP-12 - really would be handy.