Example software for a Cyclic Executive
Dependencies: MCP23017 SDFileSystem WattBob_TextLCD mbed
main.cpp
- Committer:
- sk398
- Date:
- 2016-02-17
- Revision:
- 3:c611b9bb5770
- Parent:
- 2:22ebabd78084
- Child:
- 4:b85bc0d810e1
File content as of revision 3:c611b9bb5770:
/* ############################################################################### # # # # # # # # # # # # # # # ############################################################################### */ #include "mbed.h" #include "Tasks.h" DigitalOut myled(LED1); Task1 task1(p5); // Square wave Measurement Task2 task2_switch1(p6); // Read digital Output Task3 task3(p7); // Watchdog Pulse Task4 task4(p15,p16); // Read analog Inputs int main() { task1.MeasureFreq(); int switch1State = task2_switch1.digitalInState(); task3.OutputWatchdogPulse(); float *analogReading = task4.returnAnalogReadings(); while(1) { myled = 1; wait(0.2); myled = 0; wait(0.2); } }