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 SDFileSystem
02_Digital/Digital_In.cpp@2:17a5c34b3a79, 2019-07-09 (annotated)
- Committer:
- epremeaux
- Date:
- Tue Jul 09 02:23:18 2019 +0000
- Revision:
- 2:17a5c34b3a79
- Parent:
- Digital_In.cpp@0:b471f7764d46
Added SD card examples. Had to roll back the MBED library to maintain SDFileSystem compatability
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| epremeaux | 0:b471f7764d46 | 1 | #include "mbed.h" |
| epremeaux | 0:b471f7764d46 | 2 | |
| epremeaux | 0:b471f7764d46 | 3 | DigitalOut myled(LED1); |
| epremeaux | 0:b471f7764d46 | 4 | DigitalIn boton(D2); |
| epremeaux | 0:b471f7764d46 | 5 | |
| epremeaux | 0:b471f7764d46 | 6 | int main() { |
| epremeaux | 0:b471f7764d46 | 7 | while(1) { |
| epremeaux | 0:b471f7764d46 | 8 | if (boton == 0){ |
| epremeaux | 0:b471f7764d46 | 9 | myled = 1; |
| epremeaux | 0:b471f7764d46 | 10 | }else{ |
| epremeaux | 0:b471f7764d46 | 11 | myled = 0; |
| epremeaux | 0:b471f7764d46 | 12 | } |
| epremeaux | 0:b471f7764d46 | 13 | } |
| epremeaux | 0:b471f7764d46 | 14 | } |