Test Program
Fork of mbed-os-example-mbed5-blinky by
Revision 44:1b89da6f6e1e, committed 2017-08-24
- Comitter:
- vdrelectroncis
- Date:
- Thu Aug 24 10:24:30 2017 +0000
- Parent:
- 43:f8fc29d58d3c
- Commit message:
- test
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Aug 14 15:00:02 2017 +0100
+++ b/main.cpp Thu Aug 24 10:24:30 2017 +0000
@@ -1,12 +1,37 @@
#include "mbed.h"
-DigitalOut led1(LED1);
+DigitalOut led1(PB_12);
+AnalogIn lux(PA_5); //p18 // Read Vacuum
+DigitalOut MeasureVacuum(PB_14); // p16 // Sample Vacuum
+DigitalIn FloaterInput(PB_2); // p10 PA_9
+DigitalIn SwitchInput(PB_0); // p8
+InterruptIn WakeUp(PA_0);
+DigitalOut Solonoid(PA_4);
// main() runs in its own thread in the OS
int main() {
+
+ SwitchInput.mode(PullDown);
+ FloaterInput.mode(PullDown);
+
while (true) {
- led1 = !led1;
- wait(0.5);
+ Solonoid = !Solonoid;
+ wait(10.0);
}
+
+ /*
+ while (true) {
+ if(WakeUp)
+ {
+ led1 = 1;
+ printf("High");
+ }
+ else
+ {
+ led1 = 0;
+ printf("Low");
+ wait(0.5);
+ }
+ }*/
}
