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:802145a6ea33, 2013-09-26 (annotated)
- Committer:
- gcarmonar
- Date:
- Thu Sep 26 14:35:38 2013 +0000
- Revision:
- 0:802145a6ea33
digital in example
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gcarmonar | 0:802145a6ea33 | 1 | #include "mbed.h" |
gcarmonar | 0:802145a6ea33 | 2 | |
gcarmonar | 0:802145a6ea33 | 3 | DigitalOut myled(LED1); |
gcarmonar | 0:802145a6ea33 | 4 | DigitalIn boton(D2); |
gcarmonar | 0:802145a6ea33 | 5 | |
gcarmonar | 0:802145a6ea33 | 6 | int main() { |
gcarmonar | 0:802145a6ea33 | 7 | while(1) { |
gcarmonar | 0:802145a6ea33 | 8 | if (boton == 0){ |
gcarmonar | 0:802145a6ea33 | 9 | myled = 1; |
gcarmonar | 0:802145a6ea33 | 10 | }else{ |
gcarmonar | 0:802145a6ea33 | 11 | myled = 0; |
gcarmonar | 0:802145a6ea33 | 12 | } |
gcarmonar | 0:802145a6ea33 | 13 | } |
gcarmonar | 0:802145a6ea33 | 14 | } |