Blink LED example for the Multitech mDot. Additionally, has serial comms via USB and RS232.
Fork of mbed-os-example-mbed5-blinky by
Blinks 1 LED while keeping another 2 on. LEDs are on the MTUDK2-ST-MDOT Developer Kit. Has USB and RS232 serial comms.
main.cpp
- Committer:
- Timsek
- Date:
- 2017-03-22
- Revision:
- 31:6daaaf1a1e07
- Parent:
- 29:0b58d21e87d6
- Child:
- 32:7c921089af60
File content as of revision 31:6daaaf1a1e07:
#include "mbed.h" Serial pc(USBTX, USBRX); //9600 baud rate DigitalOut led1(PA_0); // MTUDK2-ST-MDOT Developer Kit D3 DigitalOut led2(PA_1); // MTUDK2-ST-MDOT Developer Kit D6 DigitalOut led3(PA_11); // MTUDK2-ST-MDOT Developer Kit D7 // main() runs in its own thread in the OS int main() { led2 = 0; // The MTUDK2-ST-MDOT has a 74LCX14MTC before the LEDs, which inverts therefore 0 = on led3 = 0; while (true) { led1 = !led1; wait(2); //2s pc.printf("Blink! LED is now %d\r\n", led1.read()); } }