8 years, 7 months ago.

Teensy 3.1

Thank you Tom for getting back to me with the link. I have this code from the website and want to know how it works. Any time I click on save there is no window that opens for me to save in a different place. Also after compiling I get errors. can any one help?

  1. include "mbed.h"
  2. include "USBSerial.h"

Pinmode myled(LED1); USBSerial pc; virtual serial port over USB

int main() { while(1) { pc.printf("hello,world\r\n"); myled = 1; wait(0.2); myled = 0; wait(0.2); } }

1 Answer

8 years, 7 months ago.

Saving saves it online in the mbed cloud. (I write cloud but I mean server, however cloud is really hip). You can export it to a zip archive, which it will then allow you to download. But in general that is not really required except for your own backups.

Which errors do you get when compiling? If you have that code, do you also have the USBDevice library imported? https://developer.mbed.org/handbook/USBDevice

This isn't there by default since almost all other targets have a seperate interface chip which does the Serial <> USB conversion. I would advice in general to start with a blinking program, and see if you can get that to function.