Good Day everybody
I am currently trying to use the Teensy 3.6 in order to sample a voltage signal with the ADC.
For the moment I have set up an echo server with a serial connect between the Teensy and a julia coding evironment.
I am sending unsigned 8 bit numbers in the range from 0 - 255 and receiving the same numbers back.
My results seem to show that I receive all numbers except 17 and 19. On investigation I found that it is receiving the numbers but does not write them to the serial connection when calling serial.write.
My source code is shown below
void setup() {
Serial.begin(9600); // Open a serial coms channel
}
void loop() {
if (Serial.available()){ // Waiting for commands from the computer
uint8_t input = Serial.read(); // read the command
if (input == 19) Serial.write(0b000010010); //Test to see if 19 is recieved
else Serial.write(input);
}
}
I have tried the same code on the arduino uno and it works perfectly
I am currently trying to use the Teensy 3.6 in order to sample a voltage signal with the ADC.
For the moment I have set up an echo server with a serial connect between the Teensy and a julia coding evironment.
I am sending unsigned 8 bit numbers in the range from 0 - 255 and receiving the same numbers back.
My results seem to show that I receive all numbers except 17 and 19. On investigation I found that it is receiving the numbers but does not write them to the serial connection when calling serial.write.
My source code is shown below
void setup() {
Serial.begin(9600); // Open a serial coms channel
}
void loop() {
if (Serial.available()){ // Waiting for commands from the computer
uint8_t input = Serial.read(); // read the command
if (input == 19) Serial.write(0b000010010); //Test to see if 19 is recieved
else Serial.write(input);
}
}
I have tried the same code on the arduino uno and it works perfectly