Mintoris Forum

Author Topic: USB Diagnostics Demo  (Read 1942 times)

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
USB Diagnostics Demo
« on: Apr 03, 2014, 02:27 AM »
Here is the USB Serial Diagnostics program I used during the testing of Basic 6.0. I am publishing this a few days before the release of 6.0 to give you a preview of the new USB serial communications commands and to take a little of the load off me on release day.

I used this program with a Prolific USB to serial converter and a loopback plug on the RS232 end. I also tested this program with an Arduino mega using the attached Arduino loopback program.
« Last Edit: Apr 03, 2014, 07:58 PM by Chuck »

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: USB Diagnostics Demo
« Reply #1 on: Apr 06, 2014, 03:19 AM »
Here is the source code for the Arduino loopback program.

Code: [Select]
void setup() {
  // initialize serial:
  Serial.begin(9600);

}

void loop() {
  while (Serial.available()) {
    // get the new byte:
    char inChar = (char)Serial.read();
    Serial.write(inChar);
  }
}
« Last Edit: Sep 30, 2014, 04:48 AM by Chuck »