Serial link problem

Status
Not open for further replies.

allanoptical

New member
Using a Teensy 3.6 I am trying to develop a small program that is required to send to data to a PC (running Windows 10) over the Serial/USB link. The data will be sent at either in response to a command from the PC or a push button connected to digital
in line and comprises about 4000 bytes of text. Every thing works perfectly when I use a terminal program on the PC. I have used the Arduino terminal, Tera Term and PTTY with everything working as expected.
Writing a Visual Basic program with a serial port gives me problems with writing from the teensy to the PC.

To try to understand what is happening I created the small program attached. Like my "real" program this works perfectly with any of the terminals. However it will not write to my Visual Basic program unless after bootup
it is connected for a short time to a real terminal.

Is there some initialisation of the Serial port on the Teensy that I am missing?
If it is a problem with Visual Basic my apologies for troubling you.


int ctr ;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
// while (!Serial); //Wait for user to open terminal
Serial.println("I have just woken up");
ctr = 0 ;

}

void loop() {
// put your main code here, to run repeatedly:
Serial.print( ctr ) ;
Serial.print( " : " );
Serial.println("Hello World");
delay(1000);
ctr++ ;

}
 
Status
Not open for further replies.
Back
Top