Prototyping the Adaptable Emergency System on an C027 board.
Dependencies: C027_Support mbed
Fork of c027_prototyping by
main.cpp@1:23ffa0e091bc, 2014-09-30 (annotated)
- Committer:
- philemonf
- Date:
- Tue Sep 30 14:38:57 2014 +0000
- Revision:
- 1:23ffa0e091bc
- Parent:
- 0:164fb9518d1a
- Child:
- 4:f1708f6ec905
Add tests for the CellLocate
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
philemonf | 0:164fb9518d1a | 1 | #include "mbed.h" |
philemonf | 1:23ffa0e091bc | 2 | #include "MDM.h" |
philemonf | 0:164fb9518d1a | 3 | |
philemonf | 0:164fb9518d1a | 4 | DigitalOut myled(LED); |
philemonf | 0:164fb9518d1a | 5 | |
philemonf | 1:23ffa0e091bc | 6 | |
philemonf | 0:164fb9518d1a | 7 | int main() { |
philemonf | 1:23ffa0e091bc | 8 | MDMSerial mdm; |
philemonf | 1:23ffa0e091bc | 9 | |
philemonf | 1:23ffa0e091bc | 10 | MDMParser::DevStatus devStatus = {}; |
philemonf | 1:23ffa0e091bc | 11 | |
philemonf | 1:23ffa0e091bc | 12 | bool mdmOk = mdm.init("5554", &devStatus); |
philemonf | 1:23ffa0e091bc | 13 | mdm.dumpDevStatus(&devStatus); |
philemonf | 1:23ffa0e091bc | 14 | |
philemonf | 1:23ffa0e091bc | 15 | if (!mdmOk) { |
philemonf | 1:23ffa0e091bc | 16 | printf("ERROR"); |
philemonf | 1:23ffa0e091bc | 17 | } |
philemonf | 1:23ffa0e091bc | 18 | |
philemonf | 1:23ffa0e091bc | 19 | mdm.sendFormated("AT+ULOCCELL=0"); |
philemonf | 1:23ffa0e091bc | 20 | if (RESP_OK == mdm.waitFinalResp()) { |
philemonf | 1:23ffa0e091bc | 21 | printf("Receive OK"); |
philemonf | 1:23ffa0e091bc | 22 | } else { |
philemonf | 1:23ffa0e091bc | 23 | printf("Does not receive OK"); |
philemonf | 1:23ffa0e091bc | 24 | } |
philemonf | 1:23ffa0e091bc | 25 | |
philemonf | 1:23ffa0e091bc | 26 | return 0; |
philemonf | 0:164fb9518d1a | 27 | } |