![](/media/cache/profiles/2ac350bd5fbdda63bd410978526a2388.jpg.50x50_q85.png)
Testing with Daniel
Dependencies: mbed Blinker TextLCD
main.cpp@4:62ae68bcaee8, 2017-01-07 (annotated)
- Committer:
- jurgis
- Date:
- Sat Jan 07 16:00:42 2017 +0000
- Revision:
- 4:62ae68bcaee8
- Parent:
- 3:0432064270e1
- Child:
- 6:d8bc26e7d471
Using blinker library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jurgis | 1:b95c3509df0f | 1 | // Testing MBED with Daniel |
jurgis | 0:fdb33524a029 | 2 | #include "mbed.h" |
jurgis | 4:62ae68bcaee8 | 3 | #include "Blinker.h" |
jurgis | 0:fdb33524a029 | 4 | |
jurgis | 4:62ae68bcaee8 | 5 | Timer timer; |
jurgis | 0:fdb33524a029 | 6 | DigitalOut led1(LED1); |
jurgis | 3:0432064270e1 | 7 | //DigitalOut greenLed(D8); |
jurgis | 3:0432064270e1 | 8 | //DigitalOut redLed(D10); |
jurgis | 3:0432064270e1 | 9 | //DigitalIn button(D9); |
jurgis | 2:458dfec0820c | 10 | |
jurgis | 0:fdb33524a029 | 11 | Serial pc(USBTX, USBRX); |
jurgis | 4:62ae68bcaee8 | 12 | jj::Blinker blinker1(led1, timer); |
jurgis | 0:fdb33524a029 | 13 | |
jurgis | 0:fdb33524a029 | 14 | |
jurgis | 0:fdb33524a029 | 15 | int main() |
jurgis | 0:fdb33524a029 | 16 | { |
jurgis | 3:0432064270e1 | 17 | timer.start(); |
jurgis | 0:fdb33524a029 | 18 | pc.baud(115200); |
jurgis | 0:fdb33524a029 | 19 | pc.printf("Hello world\r\n"); |
jurgis | 0:fdb33524a029 | 20 | |
jurgis | 4:62ae68bcaee8 | 21 | blinker1.blink(200, 1000); |
jurgis | 3:0432064270e1 | 22 | |
jurgis | 3:0432064270e1 | 23 | for(;;) |
jurgis | 0:fdb33524a029 | 24 | { |
jurgis | 4:62ae68bcaee8 | 25 | blinker1.update(); |
jurgis | 0:fdb33524a029 | 26 | } |
jurgis | 0:fdb33524a029 | 27 | } |