hello

Committer:
davinci26
Date:
Fri Jan 26 15:35:34 2018 +0000
Revision:
1:48f2481a3715
Parent:
0:903b088ceb3e
Ping

Who changed what in which revision?

UserRevisionLine numberNew contents of line
zackeymon 0:903b088ceb3e 1 #include "mbed.h"
davinci26 1:48f2481a3715 2 // Ping
zackeymon 0:903b088ceb3e 3 // define the Serial object
zackeymon 0:903b088ceb3e 4 Serial pc(USBTX, USBRX);
zackeymon 0:903b088ceb3e 5
zackeymon 0:903b088ceb3e 6 DigitalOut led1(LED1);
zackeymon 0:903b088ceb3e 7
zackeymon 0:903b088ceb3e 8 int main() {
zackeymon 0:903b088ceb3e 9 while (true) {
zackeymon 0:903b088ceb3e 10 led1 = !led1;
zackeymon 0:903b088ceb3e 11
zackeymon 0:903b088ceb3e 12 // Print something over the serial connection
zackeymon 0:903b088ceb3e 13 pc.printf("Blink! LED is now %d\r\n", led1.read());
zackeymon 0:903b088ceb3e 14
zackeymon 0:903b088ceb3e 15 wait(0.5);
zackeymon 0:903b088ceb3e 16 }
zackeymon 0:903b088ceb3e 17 }