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.
Dependencies: TextLCD MbedJSONValue libMotiv picojson mbed-rtos mbed
Fork of Mbed_MotiVControllerBox by
Diff: main.cpp
- Revision:
- 10:f03c1cb12f45
- Parent:
- 9:11d0c72fef0d
- Child:
- 11:17ccf6a50944
--- a/main.cpp Thu Jan 08 01:58:52 2015 +0000
+++ b/main.cpp Sat Jan 10 15:35:53 2015 +0000
@@ -21,9 +21,12 @@
int intervalSec = 10;
+
//inputs
DigitalIn Up(p8);
DigitalIn Down(p14);
+bool pushedUp = false;
+bool pushedDown = false;
//outputs
DigitalOut led(p6);
@@ -58,7 +61,6 @@
void runProgram(); //Program with loop
void runController(); //Controller loop
-
/****************
MAIN
*****************/
@@ -89,7 +91,7 @@
pc.printf("Setup Controller Box\r\n");
c.setStatus(Controller::INIT);
rfd.baud(9600);
-
+ lcd.clearDisplay();
wait_ms(200);
}
@@ -114,7 +116,7 @@
tim.start();
while(1) {
if(tim.read() > intervalSec) { //polling interval passed, update tables
- printf("*%f seconds passed, reset timer*\r\n", tim.read());
+ printf("\r\n\r\n*%f seconds passed, reset timer*\r\n", tim.read());
tim.reset();
c.update();
}
@@ -124,7 +126,6 @@
}
-
void runProgram()
{
