I2C multiple write #7367
Unanswered
espruino-discuss
asked this question in
Other Boards
Replies: 1 comment
-
Posted at 2020-04-13 by @MaBecker Take a look into this module https://github.com/espruino/EspruinoDocs/blob/master/devices/SSD1306.js |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-04-13 by Abhigkar
Hi there,
I am in a process to write Espruino compatible module for Si114x Pulse sensor library which is basically a code conversion on Arduino library. The sensor uses I2C protocol for MCU comuniication.
I know that Espruino supports byte array in I2C.writeTo() method, and also stop:false/true option.
So if I would need to convert the below code what should be the best option for me?
1- Combine all bytes to single byte array?
2- Individual writeTo() call having stop:false for the first call?
3- How should I care the delay, a setTimeout/ Promise?
Reference:
Si114x datasheet
Arduino Library
Beta Was this translation helpful? Give feedback.
All reactions