Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@0:da6e02b1dc0f, 2014-04-04 (annotated)
- Committer:
- hemalathaape
- Date:
- Fri Apr 04 05:59:05 2014 +0000
- Revision:
- 0:da6e02b1dc0f
switch case
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| hemalathaape | 0:da6e02b1dc0f | 1 | #include "mbed.h" |
| hemalathaape | 0:da6e02b1dc0f | 2 | |
| hemalathaape | 0:da6e02b1dc0f | 3 | DigitalIn enable(p5); |
| hemalathaape | 0:da6e02b1dc0f | 4 | DigitalOut led(LED1); |
| hemalathaape | 0:da6e02b1dc0f | 5 | |
| hemalathaape | 0:da6e02b1dc0f | 6 | int main() { |
| hemalathaape | 0:da6e02b1dc0f | 7 | while(1) { |
| hemalathaape | 0:da6e02b1dc0f | 8 | if(enable) { |
| hemalathaape | 0:da6e02b1dc0f | 9 | led = !led; |
| hemalathaape | 0:da6e02b1dc0f | 10 | } |
| hemalathaape | 0:da6e02b1dc0f | 11 | wait(0.25); |
| hemalathaape | 0:da6e02b1dc0f | 12 | } |
| hemalathaape | 0:da6e02b1dc0f | 13 | } |