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.
Dependencies: mbed
main.cpp@0:f98ff3c57d6c, 2019-04-25 (annotated)
- Committer:
- shina
- Date:
- Thu Apr 25 08:06:05 2019 +0000
- Revision:
- 0:f98ff3c57d6c
This program is about limit switch.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| shina | 0:f98ff3c57d6c | 1 | #include "mbed.h" |
| shina | 0:f98ff3c57d6c | 2 | DigitalOut led(LED1); |
| shina | 0:f98ff3c57d6c | 3 | InterruptIn limit(D4); |
| shina | 0:f98ff3c57d6c | 4 | void flip(){ |
| shina | 0:f98ff3c57d6c | 5 | led=!led; |
| shina | 0:f98ff3c57d6c | 6 | } |
| shina | 0:f98ff3c57d6c | 7 | int main(){ |
| shina | 0:f98ff3c57d6c | 8 | limit.rise(&flip); |
| shina | 0:f98ff3c57d6c | 9 | while(true){ |
| shina | 0:f98ff3c57d6c | 10 | } |
| shina | 0:f98ff3c57d6c | 11 | } |