Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C write byte value limit fixed #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Dannero
Copy link

@Dannero Dannero commented Jun 25, 2024

The I2C block had limited usability as the maximum value of a byte that could be sent was 127.

The inputs of the I2C block are of type UInt32. If I send a single byte of this type over I2C or UART, it sends correctly, the problem occurs when the ReplaceArraySubset functions puts together the address of the slave I2C device and the array of bytes to be sent, this is where the capping of the value at 127 happens, I am not sure why. I tried replacing this function with InitializeArray and BuildArray, but to no avail as the EV3 threw an error and it didn’t want to run code with these LabView functions.

The solution was to change the type of the input value of the byte from UInt32 to Byte in the code of the block, after this change, values larger than 127 can be sent without any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant