Ok, I’m having a bit of trouble. I have been experimenting with using an off-board and so far everything has been going great. But now I’m having trouble fitting 10 gallons in an 8 gallon hat. My problem is that we have set up the serial link to send 8 bits at a time. Its perfect for sending joystick or pwm values back and forth but what happens when I want to send an integer that I have given an analog value? I know I can bit shift off the two right most bits and then replace them when they get to the coprocessor with zeros. That gives me the same value as when it was sent within 3. My question is, is there a way in c to take the two right-most bits of a value and put them into a byte and then fill up the rest of the byte with other right most bits of values so I don’t wast space. I know how to cut this byte back up and distribute the bits to their corresponding values (my coprocessor runs on python) but I don’t know how I would package and send something like this in C. Does anyone have a solution to this problem?
-Don