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:488c84481da4, 2014-05-09 (annotated)
- Committer:
- gcarmonar
- Date:
- Fri May 09 15:27:53 2014 +0000
- Revision:
- 0:488c84481da4
Ejemplo b?sico utilizando 3 botones y operaciones booleanas. (Recomiendo hacer tabla de verdad y comprobarla con este led, recuerden que es de ?nodo com?n)
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| gcarmonar | 0:488c84481da4 | 1 | #include "mbed.h" |
| gcarmonar | 0:488c84481da4 | 2 | |
| gcarmonar | 0:488c84481da4 | 3 | DigitalOut myled(LED1); |
| gcarmonar | 0:488c84481da4 | 4 | DigitalIn A(D5); |
| gcarmonar | 0:488c84481da4 | 5 | DigitalIn B(D6); |
| gcarmonar | 0:488c84481da4 | 6 | DigitalIn C(D7); |
| gcarmonar | 0:488c84481da4 | 7 | |
| gcarmonar | 0:488c84481da4 | 8 | int main() { |
| gcarmonar | 0:488c84481da4 | 9 | myled = 0; |
| gcarmonar | 0:488c84481da4 | 10 | wait(1); |
| gcarmonar | 0:488c84481da4 | 11 | while(1) { |
| gcarmonar | 0:488c84481da4 | 12 | myled = !A&B|C; |
| gcarmonar | 0:488c84481da4 | 13 | wait(0.1); |
| gcarmonar | 0:488c84481da4 | 14 | } |
| gcarmonar | 0:488c84481da4 | 15 | } |