![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Skeleton code. LCD, Serial, Feedback, MOSFETS
Dependencies: mbed mbed-rtos ShiftReg2 TextLCD
Diff: INTERFACE/Interface.cpp
- Revision:
- 4:020f93d35f6e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/INTERFACE/Interface.cpp Tue May 07 21:55:57 2019 +0000 @@ -0,0 +1,44 @@ +#include "Interface.hpp" +//Define the variables here +Serial PC(PB_10, PB_11); //TX, RX +Serial Board(PB_6, PB_7); //TX, RX +//TextLCD Lcd(PB_12, PB_13, PB_14, PB_15, PA_8, PA_9); // rs, e, d4-d7 +TextLCD Lcd(PB_12, PB_13, PB_14, PB_15, PA_8, PA_9); // rs, e, d4-d7 +DigitalOut On_board_led(PC_13);//Onborad LED needs no pass in parameter + +INTERFACE::INTERFACE(PinName N1, PinName N2, PinName N3, PinName N4,PinName N5, PinName N6, PinName N7, PinName N8,PinName N9, PinName N10, PinName N11): _Rotary_Encoder_A(N1),_Rotary_Encoder_B(N2),_Rotary_Encoder_Button(N3),_Button_1(N4), _Button_2(N5), _Button_3(N6), _MOSFET_Safety(N7), _Shift_SCLK(N8),_Shift_Latch(N9), _Shift_Enable(N10), _Shift_Data(N11) +{ + +} + +INTERFACE::~INTERFACE(){} +void INTERFACE::Init(){} +int INTERFACE::Post() +{ + return 1;//Success +} +void INTERFACE::On_board_LED_Flash() +{ + while(1) + { + On_board_led = !On_board_led; + Thread::wait(1000); + } +} +void INTERFACE::Serial() +{ + while(1) + { + PC.printf("Testing Serial\n"); + Thread::wait(1000); + } +} +void INTERFACE::LCD() +{ + while(1) + { + Lcd.printf("Testing\nINTERFACE"); + Thread::wait(1000); + } +} +