Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
response[counter]=temp & 0x0F;//store values into an array, &0x0F strips ascii off to use in char strings
In the Blackfin source code that Admin wrote up , there is the following lineCode: [Select] response[counter]=temp & 0x0F;//store values into an array, &0x0F strips ascii off to use in char stringsWhat does it mean to strip off the ASCII to use in char strings?Does it mean that it makes a received character usable for the character-type variable? Like if I send the letter 'M' as ASCII, it will convert it to an 'M' that can be stored into a character-type variable?Thanks
response[counter]=temp & 0x0F;
0100 1101& 0000 1111------------- 0000 1101
What does the original code do with the "response" array later on?
X_left=response[6]*100
A = 01000001 = 0x4101000001&00001111=00000001 Would also come out as 0x01 ?http://www.theskull.com/javascript/ascii-binary-list.html
Y_mean=response[8]*100 + response[9]*10 + response[10];
int digit = asciiDigit - '0';