We’re using the Ultrasonic rangefinder on a V5 cortex and can’t seem to get it to display or use the correct values. If we put the call to get the value and have it display on the screen in cm we get a 3 digit number, so 30cm will display as 300, if we put mm we get a 4 digit number and while the brain seems to be updating it in the while loop it isn’t being used to trigger any if statements or working as while loop exits etc. Even putting something like
Even when the sonar is displaying and updating a value shown as 200 we get nothing. It will also load at 0 triggering some functions that are only supposed to get called when the sonar is less than a certain value.