A Basic Interpreter written from scratch for the ESP8266

Moderator: Mmiscool

User avatar
By Efrem
#62216 hello
i'm using mcp3421 adc , it only work in default mode 12 bits.
I use this ic in c language in many boards.

this in my test program

i2c.setup(4,5)
let address =104
let numchars= 3
i2c.begin(address)
i2c.write(208)
i2c.write(28)
i2c.end()
i2c.begin(address)
i2c.write(209)
i2c.end()
i2c.requestfrom(address,numchars)
cifra1=i2c.read()
cifra2=i2c.read()
cifra3=i2c.read()
i2c.end()
print cifra1
print cifra2
print cifra3
end
the line i2c.write(28) seem not working....
can someone help me ???