Aidan Gallagher
/
System
new
main.cpp@0:e4c4836c31fc, 2015-07-03 (annotated)
- Committer:
- aidanPJG
- Date:
- Fri Jul 03 13:32:31 2015 +0000
- Revision:
- 0:e4c4836c31fc
changes;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
aidanPJG | 0:e4c4836c31fc | 1 | #include "mbed.h" |
aidanPJG | 0:e4c4836c31fc | 2 | |
aidanPJG | 0:e4c4836c31fc | 3 | DigitalOut myled(LED1); |
aidanPJG | 0:e4c4836c31fc | 4 | Serial pc(USBTX, USBRX); // tx, rx |
aidanPJG | 0:e4c4836c31fc | 5 | |
aidanPJG | 0:e4c4836c31fc | 6 | int main() { |
aidanPJG | 0:e4c4836c31fc | 7 | while(1) |
aidanPJG | 0:e4c4836c31fc | 8 | { |
aidanPJG | 0:e4c4836c31fc | 9 | if(pc.readable()) { |
aidanPJG | 0:e4c4836c31fc | 10 | device.putc(pc.getc()); |
aidanPJG | 0:e4c4836c31fc | 11 | |
aidanPJG | 0:e4c4836c31fc | 12 | } |
aidanPJG | 0:e4c4836c31fc | 13 | } |