A Basic Interpreter written from scratch for the ESP8266

Moderator: Mmiscool

User avatar
By Dalibor
#65798 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
Code: Select alllet 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?
User avatar
By neuronesp
#65822 No.
The component that you refer is a mosfet (output device) that is controlled with a simple high or low signal.
Not a sensor (input device)
See examples.
Read and learn as much as you can.
I am still trying to get my head around I2C.
User avatar
By trackerj
#65847 2c TIP for everybody : As a good practice, please post also a link to the datasheet or schematics of the device that you are asking for. Best way to avoid confusions and waste of time.
User avatar
By Dalibor
#65932 I will go the path of least resistance this time and buy DTH sensor. Its too complicated for me, i need more to learn. As I understand it Am2320 use more then one Bit of code to get information. Looking in arduino libraries its 0x03, 0x00, 0x04.. but i cant implement that in esp basic. I will get a simpler device so i can to practice I2C comunication.