I2C comunicaton
Posted: Wed May 10, 2017 7:37 am
Hello all
I'm a beginner, and tehnical enthusiast, please have understanding for my stupid questions.
I have am2300 sensor and traying to comunicate whit my esp8266 using basic.
As I understand it, i should use I2c protocol?
I did not get far the following example on site...:/ I finde i2c adress for my sensor, its 92.
My code look something like this
Can you point me in the right direction?
I'm a beginner, and tehnical enthusiast, please have understanding for my stupid questions.
I have am2300 sensor and traying to comunicate whit my esp8266 using basic.
As I understand it, i should use I2c protocol?
I did not get far the following example on site...:/ I finde i2c adress for my sensor, its 92.
My code look something like this
Code: Select all
let address = 92
let numchars = 1
i2c.begin(address)
i2c.write(1)
i2c.available()
i2c.end()
i2c.requestfrom(address,numchars)
delay 50
temp= i2c.read()
print temp
Can you point me in the right direction?