Quote:
Originally Posted by Roger
But aren't they both using an on/off electical signal to talk between them? Not code.
(Pay Per Click?)
|
Well, Boolean only takes up 1 byte (8 bits) in Arduino, the PPC uses 4 Bytes instead (the PPC registers are 32bits). Sending over a boolean from the PPC sends 32 bits of data. Now, considering that you can't fit 32 bits in a 8 bit register, you have to cut the extra data off using some bit manipulation. And the other problem I was pointing to was that the PPC usually are Big endian, but they can be bi (so it can be both, just not at the same time) that means the bits read from left to right, but the little endian reads right to left. So you need to do some switcharoos there.
So on the cRio a "true" would be represented as:
0000_0000_0000_0001B (if big endian)
0001_0000_0000_0000B (If little endian)
Note: I might be wrong about the above regarding the binary
on the Arduino, you need to just take the last 4 bits so it becomes:
0001B
Every microprocessors have millions and billions of transistors, they all use electrical signals.
Now, if there are any veterans here, feel free to rebuke me. I am a student, I make mistakes and then learn from them.