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:6d5d11330c0b, 2016-09-23 (annotated)
- Committer:
- flappingwing
- Date:
- Fri Sep 23 07:19:54 2016 +0000
- Revision:
- 0:6d5d11330c0b
DigitalIn demo for Nucleo F303K8
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| flappingwing | 0:6d5d11330c0b | 1 | #include "mbed.h" |
| flappingwing | 0:6d5d11330c0b | 2 | |
| flappingwing | 0:6d5d11330c0b | 3 | DigitalOut myled(LED1); |
| flappingwing | 0:6d5d11330c0b | 4 | DigitalIn input(D0); |
| flappingwing | 0:6d5d11330c0b | 5 | |
| flappingwing | 0:6d5d11330c0b | 6 | int main() { |
| flappingwing | 0:6d5d11330c0b | 7 | input.mode( PullUp ); |
| flappingwing | 0:6d5d11330c0b | 8 | |
| flappingwing | 0:6d5d11330c0b | 9 | while(1) { |
| flappingwing | 0:6d5d11330c0b | 10 | myled = !input; |
| flappingwing | 0:6d5d11330c0b | 11 | wait( 0.1 ); |
| flappingwing | 0:6d5d11330c0b | 12 | } |
| flappingwing | 0:6d5d11330c0b | 13 | } |