This is the firmware for the base version of the OpenSTEM Ranging Board hardware.
Dependencies: Servo USBDevice mbed
Fork of USBSerial_HelloWorld by
Diff: main.cpp
- Revision:
- 10:d74124f266cb
- Parent:
- 9:d88699a0905a
diff -r d88699a0905a -r d74124f266cb main.cpp --- a/main.cpp Fri Mar 01 13:33:02 2013 +0000 +++ b/main.cpp Wed Aug 10 08:01:00 2016 +0000 @@ -1,14 +1,21 @@ -#include "mbed.h" -#include "USBSerial.h" - -//Virtual serial port over USB -USBSerial serial; +#include "core_defines.h" //for all global constant definitions +#include "mbed.h" //to include the mBed library +#include "Servo.h" //to include the mBed Servo library +#include "daughter_core.h" //for all daughter board core functions + -int main(void) { - - while(1) - { - serial.printf("I am a virtual serial port\r\n"); - wait(1); +int main() { + startup_config(); + usb_serial_t("BOOT COMPLETE\r\n"); + + while(1) { + if(check_usb_rec_flg()){ + + //char comm[1]; + //comm[0] = usb_serial_bufscan(); + //usb_serial_t(comm); + usb_serial_bufscan(); + clr_usb_rec_flg(); + } } } \ No newline at end of file