Mike Fiore
/
mdot_example
example program for the dot
main.cpp@0:222505173e84, 2015-06-02 (annotated)
- Committer:
- mfiore
- Date:
- Tue Jun 02 15:40:45 2015 +0000
- Revision:
- 0:222505173e84
first commit of example program
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mfiore | 0:222505173e84 | 1 | #include "mbed.h" |
mfiore | 0:222505173e84 | 2 | |
mfiore | 0:222505173e84 | 3 | int main() { |
mfiore | 0:222505173e84 | 4 | DigitalOut led(LED1); |
mfiore | 0:222505173e84 | 5 | Serial ser(USBTX, USBRX); |
mfiore | 0:222505173e84 | 6 | |
mfiore | 0:222505173e84 | 7 | while(true) { |
mfiore | 0:222505173e84 | 8 | led = !led; |
mfiore | 0:222505173e84 | 9 | ser.printf("hello world!"); |
mfiore | 0:222505173e84 | 10 | wait(2); |
mfiore | 0:222505173e84 | 11 | } |
mfiore | 0:222505173e84 | 12 | } |