Installing the USB Driver on Windows & Serial Debugging

Ok I FINALLY have it working… seriously this feature needs to be looked at >.>

What I have to do is a bit hacky, but it works.

  1. Close Serial Terminal Software (I’m using Tera Term VT 4.80)
  2. Flash Core with code that enables Serial in setup(), but waits for a character before it continues.
  3. Wait till Core reboots and connects to the Cloud (Breathing Cyan)
  4. Open Serial Terminal Software.
  5. Open a Serial Connection at the correct baud, 8 bits, no parity, 1 stop, no flow control.
  6. Press Enter within 15 seconds of Cyan LED first Breath.
  7. Bingo bango, kiss the screen! You have serial debugging over USB. Have a :beer: or :beers:


uint32_t counter = 0;
void setup()
{
  Serial.begin(9600);         // Open serial over USB.
  while(!Serial.available()); // Just chill until we Rx a character. Don't chill
  pinMode(D7,OUTPUT);         // more than 15 seconds or the core will choke.
}
    
void loop() 
{
  Serial.print("Spark Core says Hello over USB! ");
  Serial.println(counter++);
  digitalWrite(D7,HIGH);
  delay(500);
  digitalWrite(D7,LOW);
  delay(500);
}

I initially had a timer and state machine in the main loop, but this is way more efficient and has no effect on the user code once you are out of setup(). I don’t like to have to do this, but I’m happy that I can ditch my FTDI friend for the moment.

1 Like