Not at all sure what you mean. Why should anything be in pairs?
Ok, then let me explain you better this time. If you notice, every couple of pins are labeled in an horizontal line. Take a closer look at... let's say, the MOSI label; next to it, there are two pins arranged horizontally. My question is: are those couple of pins connected together? What do you think? (I hope you have understood me this time)
PD: I don't know how to tag (post) a picture, that would be easier for you...
Nether. But write puts the actual byte in the file and print puts an ASCII representation of the value of the byte.
That's fine. I could simply write every single byte by using a
for loop. But wait... is there a
write function that receives an entire array of bytes? Isn't that the same thing?
upperByte = variable >> 8;
lowerByte = variable && 0xff;
There are some things that I'm worried about.
- Will that pair of lines just extract two bytes? The int type isn't supposed to have 4 bytes? (aka 32 bits).
- As the page mentioned before says, I need to fill up two values of 4 bytes each one before I can finalize the file. One is the "RIFF" chunk's length (file size minus 8), and the other one is the "data" chunk's length (file size minus 44). So I need to write down those values byte to byte.
- I need it in the "little-endian" order (least significant byte first, most significant byte last; in the other way around it is called "big-endian").
I'm asking you all this because I think there is no function in the
File class that writes any type of variable as a bunch of bytes (not in a character string form)