Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of UranusTest by
main.cpp
- Committer:
- swxu
- Date:
- 2017-05-18
- Revision:
- 0:ae1f7d2c4fbc
- Child:
- 1:7d1fb66613d9
File content as of revision 0:ae1f7d2c4fbc:
#include "mbed.h"
#include "USBSerial.h"
USBSerial serial; // Virtual serial port over USB
Serial uart(P0_19, P0_18);
DigitalOut led(P0_20);
int main(void) {
uart.baud(115200);
uart.format();
while(1) {
clock_t ts = clock();
led = !led;
uart.printf("Hello UART! %d\r\n", ts);
serial.printf("I am a virtual serial port %d\r\n", ts);
wait(3);
}
}
