Hello
Still new to the world of Teensy... trying to upload a program that works on a Pro Mini, and it isn't liking the Serial1 for some reason.
I am using Serial1 to talk to a Bluetooth HC-06. But, it is basically telling me that Serial1 isn't available and I cannot see why.
My HC-06 TX is connected to Teensy pin 0, and the HC-06 RX pin is connected to pin 1.
I originally had these going through a 5v/3.3v level converter, but after reading up... I don't think that is required.
My code is messy and appalling, but the relevant bit is this (which I have tried on its own)....
After loading, I open the serial port to read the outcome. It just fails to read Serial1 as available. I am pretty sure I am basically doing something stupid, but I can't see the difference between this and a Pro Mini.
Any ideas? Thank you
Still new to the world of Teensy... trying to upload a program that works on a Pro Mini, and it isn't liking the Serial1 for some reason.
I am using Serial1 to talk to a Bluetooth HC-06. But, it is basically telling me that Serial1 isn't available and I cannot see why.
My HC-06 TX is connected to Teensy pin 0, and the HC-06 RX pin is connected to pin 1.
I originally had these going through a 5v/3.3v level converter, but after reading up... I don't think that is required.
My code is messy and appalling, but the relevant bit is this (which I have tried on its own)....
After loading, I open the serial port to read the outcome. It just fails to read Serial1 as available. I am pretty sure I am basically doing something stupid, but I can't see the difference between this and a Pro Mini.
Code:
Serial1.begin(9600);
if (Serial1.available()) {
Serial.println("Starting Bluetooth configuration");
Serial1.write("AT+NAMETest"); // Set up the Bluetooth comms
delay(1000);
Serial1.write("AT+PIN1234");
delay(1000);
/*
The possible baudrates are:
AT+BAUD1-------1200
AT+BAUD2-------2400
AT+BAUD3-------4800
AT+BAUD4-------9600 - Default
AT+BAUD5------19200
AT+BAUD6------38400
AT+BAUD7------57600
AT+BAUD8-----115200
AT+BAUD9-----230400
AT+BAUDA-----460800
AT+BAUDB-----921600
*/
Serial1.write("AT+BAUD4");
delay(1000);
Serial.println("Configuration complete");
} else { Serial.println("Bluetooth error");}
Any ideas? Thank you