To use AM232x with I2C, it requires a specific "wake up" command which requires a command to be sent, followed by a 800 us to 3 ms delay, then a stop signal. (See section 8.2.4 of https://www.isweek.com/Uploads/20180528/5b0bbbc09cff2.pdf )
This doesn't appear to be possible using the I2C Espruino module, as granular functions (like beginTransmission, endTransmission in other platforms) are rolled into the 2 functions writeTo, readFrom.
Admittedly, this sort of granular control with delays isn't exactly Javascript's (or Espruino's) forte.
I'm unsure if this interaction is considered standard (e.g. https://github.com/espruino/Espruino/issues/390 introduced a "Repeated Start" capability), but perhaps it could be added as a capability.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
To use AM232x with I2C, it requires a specific "wake up" command which requires a command to be sent, followed by a 800 us to 3 ms delay, then a stop signal. (See section 8.2.4 of https://www.isweek.com/Uploads/20180528/5b0bbbc09cff2.pdf )
This doesn't appear to be possible using the I2C Espruino module, as granular functions (like beginTransmission, endTransmission in other platforms) are rolled into the 2 functions writeTo, readFrom.
Admittedly, this sort of granular control with delays isn't exactly Javascript's (or Espruino's) forte.
I'm unsure if this interaction is considered standard (e.g. https://github.com/espruino/Espruino/issues/390 introduced a "Repeated Start" capability), but perhaps it could be added as a capability.
Alternatively, you could always bit bang the entire I2C conversation manually. (e.g. http://forum.espruino.com/conversations/286138/?offset=25 ).
It's probably easier to fall back to the "single-bus" mode (which is wired differently as mentioned above).
I'm trying to use Espruino with an AM2322 and I ran into this complication.