I've just ported a program for an Arduino to Teensy 2 & it failed. I've narrowed the issue to a problem with String() which doesn't seem to like variables declared as byte.
This seems to work just as I'd expect with an Arduino & a Teensy 3.1. Sketch below illustrates:
This seems to work just as I'd expect with an Arduino & a Teensy 3.1. Sketch below illustrates:
Code:
byte data_1=22; //doesn't print
int8_t data_2=33; //does print
uint8_t data_3=44; //doesn't print
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(String(data_1));
Serial.println(String(data_2));
Serial.println(String(data_3));
delay(1000);
}