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.
Diff: main.cpp
- Revision:
- 0:575ebe257bd6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Dec 15 04:47:55 2016 +0000 @@ -0,0 +1,55 @@ +#include "mbed.h" +#include "CommandProcessor.h" +#include "C12666.h" + + +Serial serial(USBTX, USBRX); +DigitalOut specGain(A0); +DigitalOut specST(A1); +DigitalOut specClock(A2); +AnalogIn specVideo(A3); +DigitalOut whiteLED(A4); +DigitalOut laserLED(A5); +DigitalOut clippingLED(LED3); +Ticker clockTicker; +C12666_spectrometer spec; + +// use debug level to turn on/off various printf logging stuff +int debugLevel = 0; + +// Use setup and loop style logic a la Arduino +// so that we can use the dispatch code from the various other modules in the suste +void setup(); +void loop(); + +int main() +{ + setup(); + while(1) { + loop(); + } +} + +void setup(void) +{ + // Set up the serial port ... + serial.baud(115200); + serial.printf("Biorealize: PureEngineering C12666MA UV-VIS Spectrometer 03MAY2016\n"); + + + + + // initialize the variables that handle command dispatching + initializeCommandProcessor(); + + + +} + +void loop(void) +{ + processSerialCommands(); +} + + +