Test out DigitalOut on Teensy 3.1

Dependencies:   mbed USBDevice

Committer:
yoonghm
Date:
Sun Jul 26 01:40:06 2015 +0000
Revision:
1:e452bc59d245
Parent:
0:8495741fab9c
Include USBDevice

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yoonghm 1:e452bc59d245 1 // MBED_BLINKY with Teensy 3.1
yoonghm 1:e452bc59d245 2
yoonghm 1:e452bc59d245 3 // You need to update the latest USBDevice library
yoonghm 0:8495741fab9c 4
yoonghm 1:e452bc59d245 5 #include "mbed.h"
yoonghm 1:e452bc59d245 6 #include "USBSerial.h"
yoonghm 1:e452bc59d245 7
yoonghm 1:e452bc59d245 8 DigitalOut myled(LED1); // Onboard LED
yoonghm 1:e452bc59d245 9 USBSerial pc; // Virtual serial port over USB
yoonghm 1:e452bc59d245 10
yoonghm 0:8495741fab9c 11
yoonghm 0:8495741fab9c 12 int main() {
yoonghm 0:8495741fab9c 13 while(1) {
yoonghm 1:e452bc59d245 14 pc.printf("Hello World\r\n");
yoonghm 0:8495741fab9c 15 myled = 1;
yoonghm 0:8495741fab9c 16 wait(0.2);
yoonghm 0:8495741fab9c 17 myled = 0;
yoonghm 0:8495741fab9c 18 wait(0.2);
yoonghm 0:8495741fab9c 19 }
yoonghm 0:8495741fab9c 20 }