a command line interface that can dynamically assign pins
Dependencies: TextLCD mbed PS2
main.cpp@0:4b04cc4cccb4, 2011-10-20 (annotated)
- Committer:
- gsulc
- Date:
- Thu Oct 20 20:27:04 2011 +0000
- Revision:
- 0:4b04cc4cccb4
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gsulc | 0:4b04cc4cccb4 | 1 | #include "mbed.h" |
gsulc | 0:4b04cc4cccb4 | 2 | #include <string.h> |
gsulc | 0:4b04cc4cccb4 | 3 | #include "Command.h" |
gsulc | 0:4b04cc4cccb4 | 4 | |
gsulc | 0:4b04cc4cccb4 | 5 | DigitalOut myled(LED1); |
gsulc | 0:4b04cc4cccb4 | 6 | |
gsulc | 0:4b04cc4cccb4 | 7 | //Serial pc(USBTX, USBRX); // USB Virtual COM |
gsulc | 0:4b04cc4cccb4 | 8 | //char input[32]; |
gsulc | 0:4b04cc4cccb4 | 9 | |
gsulc | 0:4b04cc4cccb4 | 10 | int main() { |
gsulc | 0:4b04cc4cccb4 | 11 | while(1) { |
gsulc | 0:4b04cc4cccb4 | 12 | /* |
gsulc | 0:4b04cc4cccb4 | 13 | // Read Input |
gsulc | 0:4b04cc4cccb4 | 14 | pc.printf("> "); |
gsulc | 0:4b04cc4cccb4 | 15 | pc.scanf("%s", input); |
gsulc | 0:4b04cc4cccb4 | 16 | pc.printf("\n\r"); |
gsulc | 0:4b04cc4cccb4 | 17 | pc.printf("%s\n\r", input); |
gsulc | 0:4b04cc4cccb4 | 18 | |
gsulc | 0:4b04cc4cccb4 | 19 | // Execute Instruction |
gsulc | 0:4b04cc4cccb4 | 20 | if(1) |
gsulc | 0:4b04cc4cccb4 | 21 | execute(input);*/ |
gsulc | 0:4b04cc4cccb4 | 22 | run(); |
gsulc | 0:4b04cc4cccb4 | 23 | |
gsulc | 0:4b04cc4cccb4 | 24 | // Pulse Check |
gsulc | 0:4b04cc4cccb4 | 25 | myled = 1; |
gsulc | 0:4b04cc4cccb4 | 26 | wait(0.2); |
gsulc | 0:4b04cc4cccb4 | 27 | myled = 0; |
gsulc | 0:4b04cc4cccb4 | 28 | wait(0.2); |
gsulc | 0:4b04cc4cccb4 | 29 | } |
gsulc | 0:4b04cc4cccb4 | 30 | } |