How do you control the 24 LEDs from the Arduino API? I don’t see any API calls or register names that look like they are useful to that end. I assume there is a register you write to, is it documented in the API files?
Hello, thank you for contacting us. We have not added this feature to the Arduino API yet. We do have this feature in the open-source API for c, python and C#. If you would like to bring over this feature, you can find the source starting here https://github.com/sensel/sensel-api/blob/1139c84b35837dce94f49ef926ca5e9d55693fd7/sensel-lib/src/sensel.c#L293.
I’m trying to port the LED codes over to my copy of the Arduino API, but I don’t understand the senselWriteReg function in file sensel.ino . Lines 80 and 81 write the same byte twice. And there seems to be no code to write 16-bit values to two-byte registers. Why is that?
Hello, the same byte is sent twice in the Arduino code because the second byte is the checksum, which is useful when writing more than one byte as a check on the data being sent. Currently, the Arduino code is only set up to send single bytes but still needs to comply with the protocol. You can see the full write method in our open source API here https://github.com/sensel/sensel-api/blob/1139c84b35837dce94f49ef926ca5e9d55693fd7/sensel-lib/src/sensel_register.c#L102.
Additionally, the LED commands do not use write register, they use the variable size write register, which can be found here in the open source api: https://github.com/sensel/sensel-api/blob/1139c84b35837dce94f49ef926ca5e9d55693fd7/sensel-lib/src/sensel_register.c#L199
We will be adding more functionality and documentation to the Arduino API in the future, but do not have a release date at this time.
Hi,
Still totally lost with the LED control, is an API update or example for how to control the LEDs will be available soon ?
Thanks
Olivar