loading
 
Display object recognition values as integers
Anonymous
4 months
I'm trying to configure the serial communications module to send object orientation as only an integer. I've seen that this is possible for blob tracking, but I am using object recognition and can't find any setting for integers. Right now it gives me three decimals of superfluous data. Is there a way to configure this?

Thanks
Steven Gentner from United States  [1408 posts] 4 months
This will depend on how you have specified things in the serial module. Most likely the number is being transmitted as a 4 byte floating point number which is the most efficient way to send a decimal number. If you just want a single text integer you can try

\i[my_variable]

but this could be 1 byte or 3 bytes (i.e. 5 degrees or 324 degrees). Note the 'i' between the \ and [.

Or you can try

\w[my_variable]

which would send a 2 integer byte with the first byte being the higher value, i.e. byte * 256.

See

http://www.roborealm.com/help/Text_Formats.php

for more info.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index