I2C_Demo_For_ESP8266_NONOS_SDK is a demo about I2C based on ESP8266_NONOS_SDK.If using ESP8266_NONOS_SDK_V1.5.0 or later version, please add "-lcrypto" in 'LINKFLAGS_eagle.app.v6" area of the Makefile.I2C_Demo_For_ESP8266_NONOS_SDK 为基于 ESP8266_NONOS_SDK 的 I2C 应用的示例。如果使用 ESP8266_NONOS_SDK_V1.5.0 或之后版本，请在示例的 Makefile 中 'LINKFLAGS_eagle.app.v6" 区域增加 "-lcrypto" 。

Call me slow but I came looking for an example of I2c - and there's a NONOS file - with everything BUT an example of I2c - am I missing something?

I'm having trouble - I have an ESP8266 talking to Arduino. The ESP can send multiple bytes to the Arduino - no problem - but I haven't a clue how to get multiple bytes back into the ESP. Repeated reads causes the ESP to crash so clearly I'm missing somebut I can't find anything out there - examples of using the SDK code for communications - indeed there aren't even any examples in the SDK.

scargill wrote:..I'm having trouble - I have an ESP8266 talking to Arduino.

hi pete, i understand you so , you use ESP8266 as I2C MasterArduino as I2C Slaveok?

scargill wrote:The ESP can send multiple bytes to the Arduino - no problem - but I haven't a clue how to get multiple bytes back into the ESP.

so , do this:you pulse the clk by esp8266 as master to the arduino and read the input on esp8266 sda what the i2c slave arduino send.

scargill wrote:Repeated reads causes the ESP to crash so clearly I'm missing somebut I can't find anything out there - examples of using the SDK code for communications - indeed there aren't even any examples in the SDK.

perhabs it helps to understand, how you must code the arduino ( I2C Slave ) that you can read by the Master ( ESP8266 ) from the Slave ( Arduino )The SDA is the own pin for Master send and for Slave receivealso , for Slave send, and Master receive.The direction is in the I2C standard protokol described

hope this helps.

best wishesrudi

edit:NONOS: read i2c_master.hthere are all your friends here what you need for read from Arduino, you must code Arduino in the Arduino IDE as Slave with an address,and this you send by ESP8266 as I2C Master to the Arduino,and then you can read by the Master..:

you must study I2C protokoll first, so you see the tree in the jungle what you search for

you start with a start by the master, that do the sda low and then comes the clkthis is the begin of the protokoll,"see start condition"(if you do this with multi masters then you must check before, that bus is free with a check for SDA is high example..)with a SDA low you signal in the bus, that you are will send data now. after this , the bus is yours.

then slave put the bits on at sda on each clk pulse ( 8 bits= 1 byte )this is done, if the master reads a byte, because only the master can pulse the clk..so edit ( for better understanding ) the master read a Byte and on 9. clk cykle gives a ACK or NACK for the LAST

Documentation

About Us

Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.