How to read data from device in I2C? #6451
Unanswered
espruino-discuss
asked this question in
ESP8266
Replies: 1 comment
-
Posted at 2022-02-01 by @fanoush There are three different device adresses used in your code -0x68,0x75,0x3b so which one is correct for your device? Posted at 2022-02-01 by user136941 Thanks, is already edited the device is I didn't know that the second parameters accept Bytes. Now its works, but the library |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Posted at 2022-02-01 by user136941
Hello, I'm trying to figure out an error, when I realized that the problem is that I'm using wrong the
I2C
function. I need to read 8 bits from an address (0x75
) in a i2c device (0x68
). Following code is an example from libraries and docs:Got the next error:
The
readFrom
function doesn't take as parameter the internal address of the device, that's why the error, is pointing to a device no to the internal address.My device is an
MPU9250
, it works on Arduino and Micropython.Beta Was this translation helpful? Give feedback.
All reactions