commit example for lecture 7

Dependencies:   mbed

Committer:
kaushalpkk
Date:
Tue Jul 10 18:42:52 2018 +0000
Revision:
0:a17221892226
Child:
1:740b37ae44c3
test software.. delays changed to 2seconds. debug is off

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kaushalpkk 0:a17221892226 1 #include "mbed.h"
kaushalpkk 0:a17221892226 2
kaushalpkk 0:a17221892226 3 DigitalOut myled(LED1);
kaushalpkk 0:a17221892226 4
kaushalpkk 0:a17221892226 5 #define debug_print(...) \
kaushalpkk 0:a17221892226 6 do { if (DEBUG) printf(__VA_ARGS__); } while (0)
kaushalpkk 0:a17221892226 7
kaushalpkk 0:a17221892226 8 int main() {
kaushalpkk 0:a17221892226 9 debug_print("hello");
kaushalpkk 0:a17221892226 10 while(1) {
kaushalpkk 0:a17221892226 11 myled = 1;
kaushalpkk 0:a17221892226 12 wait(2);
kaushalpkk 0:a17221892226 13 myled = 0;
kaushalpkk 0:a17221892226 14 wait(2);
kaushalpkk 0:a17221892226 15 }
kaushalpkk 0:a17221892226 16 }