Quote:
|
Originally Posted by Jeff_Rice
I was going to put this in a new thread, but is discussed a little here. Could someone explain how to use the 6 user bytes please(without messing up my pwm outputs)?
|
Here's an example from our user_routines.c
(make sure you have ifi_aliases.h included)
[edit]Each of these User_Byte1,2,3,4,5,6 are defined in ifi_aliases.h and are all "unsigned char"
Code:
User_Byte1 = LeftAmps;
User_Byte2 = RightAmps;
/* Display the gyro heading byte3 if its negative, byte4 if its positive */
igyrovalue = Gyro_Degrees();
if (igyrovalue > 0)
{
User_Byte3 = 0;
User_Byte4 = (char) igyrovalue;
}
else
{
User_Byte3 = (char) -igyrovalue;
User_Byte4 = 0;
}
User_Byte5 = 99; // Displays "99" on the dashboard program
User_Byte6 = 254; // No particular reason