José Alejandro Mejía García
/
Persianas_Bluethoot
Persianas Bluethoot
main.cpp@1:34b7ca9fdc5a, 2016-02-19 (annotated)
- Committer:
- Jamg
- Date:
- Fri Feb 19 14:39:43 2016 +0000
- Revision:
- 1:34b7ca9fdc5a
- Parent:
- 0:e2590f0970fb
Pruebas iniciales
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jamg | 0:e2590f0970fb | 1 | #include "mbed.h" |
Jamg | 1:34b7ca9fdc5a | 2 | Serial puerto(PTE22,PTE23); |
Jamg | 1:34b7ca9fdc5a | 3 | PwmOut persiana(D2); |
Jamg | 1:34b7ca9fdc5a | 4 | DigitalIn arriba(D3); |
Jamg | 1:34b7ca9fdc5a | 5 | DigitalIn abajo(D4); |
Jamg | 0:e2590f0970fb | 6 | |
Jamg | 0:e2590f0970fb | 7 | int main() { |
Jamg | 1:34b7ca9fdc5a | 8 | puerto.baud(9600); |
Jamg | 1:34b7ca9fdc5a | 9 | |
Jamg | 1:34b7ca9fdc5a | 10 | |
Jamg | 0:e2590f0970fb | 11 | while(1) { |
Jamg | 1:34b7ca9fdc5a | 12 | if (puerto.getc()=='up'){ |
Jamg | 1:34b7ca9fdc5a | 13 | |
Jamg | 1:34b7ca9fdc5a | 14 | persiana = 1; |
Jamg | 1:34b7ca9fdc5a | 15 | if (puerto.getc()=='down'){ |
Jamg | 1:34b7ca9fdc5a | 16 | |
Jamg | 1:34b7ca9fdc5a | 17 | persiana = 1; |
Jamg | 1:34b7ca9fdc5a | 18 | }}} |
Jamg | 1:34b7ca9fdc5a | 19 | |
Jamg | 1:34b7ca9fdc5a | 20 | } |