Usage Demo

This guide no longer works with the original Trinket - we recommend upgrading to the Adafruit Trinket M0 (Product #3500) which has built in USB and does not need any special hacks to work!
The video above should be viewed in 720p and full screen if you want to read the text on screen

The sketch used in the demo is posted below
Download: file
#include "TrinketFakeUsbSerial.h"

void setup()
{
  TFUSerial.begin();
}

void loop()
{
  TFUSerial.task(); // this should be called at least once every 10 ms

  if (TFUSerial.available()) {
    char c = TFUSerial.read();
    if (c == 'a')
    {
      TFUSerial.println("hello world");
    }
    else if (c == 'b')
    {
      TFUSerial.println(millis(), DEC);
    }
  }
}
This guide was first published on Oct 15, 2013. It was last updated on Oct 15, 2013. This page (Usage Demo) was last updated on Sep 15, 2019.