Bryce Himebaugh
/
motor_buffer
Pager Motor Example
Diff: main.cpp
- Revision:
- 3:2e70eaa59446
- Parent:
- 2:007b4fa1f64e
- Child:
- 4:aaa50ac098c9
diff -r 007b4fa1f64e -r 2e70eaa59446 main.cpp --- a/main.cpp Fri Dec 03 13:34:24 2021 +0000 +++ b/main.cpp Fri Dec 03 13:44:27 2021 +0000 @@ -19,7 +19,7 @@ DigitalOut led(LED1); p1.write(0.0); - pc.printf("L432> "); + pc.printf("\n\rMotor> "); while (true) { ch = pc.getc(); @@ -36,21 +36,21 @@ else if (!strcmp(cmd,"lof")) { led = 0; } - else if (!strcmp(cmd,"monh")) { + else if (!strcmp(cmd,"high")) { p1.write(1.0); } - else if (!strcmp(cmd,"monm")) { + else if (!strcmp(cmd,"med")) { p1.write(0.5); } - else if (!strcmp(cmd,"monl")) { + else if (!strcmp(cmd,"low")) { p1.write(0.15); } - else if (!strcmp(cmd,"mof")) { + else if (!strcmp(cmd,"off")) { p1.write(0.0); } pc.printf("\n\r"); - pc.printf("L432> "); + pc.printf("Motor> "); } }