No I am using windows IOT and C# . Here is the method I am using. Sometimes it works correctly other times it returns the same value for Max, MIN and Start, it usually is the Start value which is returned 3 times. It does not happen all the time thought . The 65535 value seems to be returned randomly . When I compile my code in debug mode it works correctly , however when I compile it in release mode the start value is returned for start,min and max. Could it be a timing issue ? Or maybe because I am using the Lightning driver for IOT rather than the inbox driver ? Here is the code I use to read the value
private int GetIntegerValue(byte commandValue)
{
byte[] recvBytes = new byte[I2C_MAX_LEN];
byte[] sendBytes = new byte[] { commandValue };
ubI2C.Write(sendBytes);
ubI2C.Read(recvBytes);
int minVal = ((int)recvBytes[1] << 8) + (int)recvBytes[2];
return minVal;
}
Please ignore above issues. I have switched to using the inbox controller driver on IOT rather than the lightning memory mapped driver and the problems are resolved. Apologies for raising non existent issue.
piborg
Thu, 11/21/2019 - 11:06
Permalink
Servo limits sometimes read 65535
Is this using the
GetServoMinimumX
andGetServoMaximumX
functions from the UltraBorg.py library?chrisgZA
Thu, 11/21/2019 - 15:18
Permalink
No I am using windows IOT and
No I am using windows IOT and C# . Here is the method I am using. Sometimes it works correctly other times it returns the same value for Max, MIN and Start, it usually is the Start value which is returned 3 times. It does not happen all the time thought . The 65535 value seems to be returned randomly . When I compile my code in debug mode it works correctly , however when I compile it in release mode the start value is returned for start,min and max. Could it be a timing issue ? Or maybe because I am using the Lightning driver for IOT rather than the inbox driver ? Here is the code I use to read the value
chrisgZA
Thu, 11/21/2019 - 15:29
Permalink
I can cofirm above problem is related to lightning driver
Hi,
Please ignore above issues. I have switched to using the inbox controller driver on IOT rather than the lightning memory mapped driver and the problems are resolved. Apologies for raising non existent issue.
piborg
Fri, 11/22/2019 - 11:29
Permalink
Glad to hear you found the problem
That is good news, these problems can be difficult to find :)
Thanks for letting us know what the solution is. I will make a note of this in case anyone else asks about using our boards with Windows IoT.