![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Added the pin outs
Dependencies: mbed mbed-rtos ShiftReg TextLCD
Diff: main.cpp
- Revision:
- 3:3700f0c29710
- Parent:
- 2:4c18a6d89f19
- Child:
- 4:1ef122d47bf3
--- a/main.cpp Tue Apr 09 18:45:33 2019 +0000 +++ b/main.cpp Wed Apr 10 11:33:32 2019 +0000 @@ -1,40 +1,25 @@ -#include "mbed.h" -#include "rtos.h" //Real Time Operating System. https://os.mbed.com/handbook/RTOS -#include "TextLCD.h" -#include "ShiftReg.h" - -//Pinouts for the bluepill can be found here -//https://os.mbed.com/users/hudakz/code/STM32F103C8T6_Hello/ +#include "Setup.hpp" -DigitalOut myled(PC_13); //Onboard LED -Serial PC(PB_10, PB_11); //TX, RX -TextLCD LCD(PB_12, PB_13, PB_14, PB_15, PA_8, PA_9); // rs, e, d4-d7 -//ShiftReg SR1(PA_12, PA_11, PA_10); //data, store, clock - -DigitalOut Muscle0(PA_10); -DigitalOut Muscle1(PA_10); - -AnalogIn FEEDBACK_0(PB_0); -AnalogIn FEEDBACK_1(PB_1); - +DigitalOut myled(PC_13); +void Serial_Function(){INTERFACE_1.Serial();}//Written inside the interface class and Serial function int main() { - - - while(1) { + POST();//Run Power on self test + Serial_Thread.start(Serial_Function); + while(1) + { myled = 1; // LED is ON - Muscle0 = 1; + //Muscle0 = 1; wait(1); // 200 ms myled = 0; // LED is OFF - Muscle0 = 0; + //Muscle0 = 0; wait(1); // 1 sec - PC.printf("troll lol lol lol lol lol lol\n\r"); - PC.printf("%.6f %.6f\n\r",FEEDBACK_0.read(),FEEDBACK_1.read()); - LCD.printf("Hello World!\n"); + // PC.printf("%.6f %.6f\n\r",FEEDBACK_0.read(),FEEDBACK_1.read()); + //LCD.printf("Hello World!\n"); } }