I'm porting some Arduino code to a mcu in pure c.
The data type byte
is used in the arduino code which is not supported by the compiler. I'm wondering which data byte should I use uint8_t
or unsigned char
? Which is more correct? I'm relatively new to coding.
I gather it depends what the intent of the variable.
The variable will store hex data from this camera (screen shot of output).
byte incomingbyte;
void loop()
{
byte a[32];
int ii;
while(Serial2.available()>0)
{
incomingbyte=Serial2.read();
}
}
Many thanks