Hi! Got a short program write ints to the serial port and I get a very strange behavior. My guess is that arduino think test2 and test3 is in OCT for because the 0 in the start. Can I specify that it is DEC like 0x in HEX or 0b BIN? And is there any good way to convert a DEC to OCT in arduino? (Not in the print function)
void setup() {
Serial.begin(57600);
int test1 = 23;
int test2 = 023;
int test3 = 0023;
Serial.println(test1);
Serial.println(test2);
Serial.println(test3);
}
Output:
23
19
19