Flovac Mbed / Mbed OS mbed-os-xdot-input-test

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 DigitalOut led1(PB_12);
00004 AnalogIn  lux(PA_5); //p18 // Read Vacuum
00005 DigitalOut MeasureVacuum(PB_14); // p16 // Sample Vacuum
00006 DigitalIn FloaterInput(PB_2); // p10 PA_9
00007 DigitalIn SwitchInput(PB_0); // p8
00008 InterruptIn WakeUp(PA_0);
00009 DigitalOut Solonoid(PA_4);
00010 
00011 // main() runs in its own thread in the OS
00012 int main() {
00013     
00014     SwitchInput.mode(PullDown);
00015     FloaterInput.mode(PullDown);
00016 
00017     while (true) {
00018         Solonoid = !Solonoid;
00019         wait(10.0);
00020     }
00021     
00022     /*
00023     while (true) {
00024         if(WakeUp)
00025         {
00026             led1 = 1;
00027             printf("High");
00028         }
00029         else 
00030         {
00031            led1 = 0;
00032            printf("Low");
00033            wait(0.5);
00034         }
00035     }*/
00036 }
00037