K Abhisheik
/
sevensegment
fghfg
Fork of HelloWorld by
Diff: main.cpp
- Revision:
- 2:595052335613
- Parent:
- 0:fb6bbc10ffa0
--- a/main.cpp Sun Jan 01 20:57:57 2012 +0000 +++ b/main.cpp Thu Jul 16 10:10:46 2015 +0000 @@ -1,12 +1,28 @@ -#include "mbed.h" - -DigitalOut myled(LED1); +#include "mbed.h" -int main() { - while(1) { - myled = 1; - wait(0.2); - myled = 0; - wait(0.2); - } -} +DigitalOut a(p8),b(p12),c(p11),d(p5),e(p6),f(p7),g(p9); +int main() +{ +a=0;b=0;c=0;d=0;e=0;f=0;g=1; +wait(1); +a=1;b=0;c=0;d=1;e=1;f=1;g=1; +wait(1); +a=0;b=0;c=1;d=0;e=0;f=1;g=0; +wait(1); +a=0;b=0;c=0;d=0;e=1;f=1;g=0; +wait(1); +a=1;b=0;c=0;d=1;e=1;f=0;g=0; +wait(1); +a=0;b=1;c=0;d=0;e=1;f=0;g=0; +wait(1); +a=0;b=1;c=0;d=0;e=0;f=0;g=0; +wait(1); +a=0;b=0;c=0;d=1;e=1;f=1;g=1; +wait(1); +a=0;b=0;c=0;d=0;e=0;f=0;g=0; +wait(1); +a=0;b=0;c=0;d=0;e=1;f=0;g=0; +wait(1); +} + +