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.
Test.cpp@0:f42f18c56a88, 2013-11-16 (annotated)
- Committer:
- pcolla
- Date:
- Sat Nov 16 00:48:19 2013 +0000
- Revision:
- 0:f42f18c56a88
alarma VyV
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| pcolla | 0:f42f18c56a88 | 1 | #include "alarma.h" |
| pcolla | 0:f42f18c56a88 | 2 | #include "mbed.h" |
| pcolla | 0:f42f18c56a88 | 3 | |
| pcolla | 0:f42f18c56a88 | 4 | int Test1 = 0; |
| pcolla | 0:f42f18c56a88 | 5 | int Test2 = 0; |
| pcolla | 0:f42f18c56a88 | 6 | int j = 0; |
| pcolla | 0:f42f18c56a88 | 7 | int resultado = 0; |
| pcolla | 0:f42f18c56a88 | 8 | |
| pcolla | 0:f42f18c56a88 | 9 | int Test(void){ |
| pcolla | 0:f42f18c56a88 | 10 | Auto = 1; //Luego de un test se arma automáticamente. |
| pcolla | 0:f42f18c56a88 | 11 | while(Pulsador != 0){ |
| pcolla | 0:f42f18c56a88 | 12 | LED(Titila); |
| pcolla | 0:f42f18c56a88 | 13 | KeepAlive(); |
| pcolla | 0:f42f18c56a88 | 14 | } |
| pcolla | 0:f42f18c56a88 | 15 | Test1 = SensorAnalogico(); //Sistema testea |
| pcolla | 0:f42f18c56a88 | 16 | Test2 = SensorDigital(); //Sistema testea |
| pcolla | 0:f42f18c56a88 | 17 | for(j=0;j<2;j++) |
| pcolla | 0:f42f18c56a88 | 18 | LED(Titila); //Usuario testea |
| pcolla | 0:f42f18c56a88 | 19 | LuzDisparo(delayLuz); //Usuario testea |
| pcolla | 0:f42f18c56a88 | 20 | Sirena(testSirena); //Usuario testea |
| pcolla | 0:f42f18c56a88 | 21 | if((Test1 != 1) || (Test2 != true)) |
| pcolla | 0:f42f18c56a88 | 22 | resultado = 0; |
| pcolla | 0:f42f18c56a88 | 23 | else |
| pcolla | 0:f42f18c56a88 | 24 | resultado = 1; |
| pcolla | 0:f42f18c56a88 | 25 | return resultado; |
| pcolla | 0:f42f18c56a88 | 26 | } |