Added the pin outs

Dependencies:   mbed mbed-rtos ShiftReg TextLCD

Files at this revision

API Documentation at this revision

Comitter:
thomasmorris
Date:
Mon May 06 22:13:28 2019 +0000
Parent:
6:347c1f441b94
Commit message:
Added the pinouts

Changed in this revision

Feedback/Feedback.cpp Show annotated file Show diff for this revision Revisions of this file
Feedback/Feedback.hpp Show annotated file Show diff for this revision Revisions of this file
Interface/Interface.cpp Show annotated file Show diff for this revision Revisions of this file
Interface/Interface.hpp Show annotated file Show diff for this revision Revisions of this file
Post/Post.cpp Show annotated file Show diff for this revision Revisions of this file
Power/Power.hpp Show annotated file Show diff for this revision Revisions of this file
--- a/Feedback/Feedback.cpp	Thu Apr 11 18:12:31 2019 +0000
+++ b/Feedback/Feedback.cpp	Mon May 06 22:13:28 2019 +0000
@@ -1,6 +1,11 @@
 #include "Feedback.hpp"
-
-FEEDBACK::FEEDBACK(){}
+//POWER::POWER(PinName N1, PinName N2, PinName N3, PinName N4) : Muscle_1(N1),Muscle_2(N2),FEEDBACK_1(N3),FEEDBACK_2(N4)
+FEEDBACK::FEEDBACK(PinName N1, PinName N2, PinName N3, PinName N4, PinName N5, PinName N6, PinName N7, PinName N8, PinName N9, PinName N10) : 
+_Battery_Measurement(N1),_Temperature_Sensor_1(N2),_Temperature_Sensor_2(N3),_Temperature_Sensor_3(N4),
+_Feedback_Sensor_1(N5),_Feedback_Sensor_2(N6),_Feedback_Sensor_3(N7),_Feedback_Sensor_4(N8),_Feedback_Sensor_5(N9),_Feedback_Sensor_6(N10)
+{
+    
+}
 FEEDBACK::~FEEDBACK(){}
 void FEEDBACK::Init(){}
 int FEEDBACK::Post()//Power on self test
--- a/Feedback/Feedback.hpp	Thu Apr 11 18:12:31 2019 +0000
+++ b/Feedback/Feedback.hpp	Mon May 06 22:13:28 2019 +0000
@@ -10,7 +10,8 @@
 class FEEDBACK
 {
     public://Public member functions and variables
-    FEEDBACK();
+    
+    FEEDBACK(PinName N1, PinName N2, PinName N3, PinName N4, PinName N5, PinName N6, PinName N7, PinName N8, PinName N9, PinName N10);
     ~FEEDBACK();
     void Init();
     int Post();
@@ -24,7 +25,17 @@
     //Private Functions
     
     //Private Variables
-    
+    //Measurement
+    AnalogIn _Battery_Measurement;
+    AnalogIn _Temperature_Sensor_1;
+    AnalogIn _Temperature_Sensor_2;
+    AnalogIn _Temperature_Sensor_3;
+    AnalogIn _Feedback_Sensor_1;
+    AnalogIn _Feedback_Sensor_2;
+    AnalogIn _Feedback_Sensor_3;
+    AnalogIn _Feedback_Sensor_4;
+    AnalogIn _Feedback_Sensor_5;
+    AnalogIn _Feedback_Sensor_6;
     
 };
 #endif //_FEEDBACK_
\ No newline at end of file
--- a/Interface/Interface.cpp	Thu Apr 11 18:12:31 2019 +0000
+++ b/Interface/Interface.cpp	Mon May 06 22:13:28 2019 +0000
@@ -1,10 +1,16 @@
 #include "Interface.hpp"
 //Define the variables here
-Serial PC(PB_10, PB_11);    //TX, RX
+Serial PC(PB_6, PB_7);    //TX, RX
+Serial Board(PB_10, PB_11); //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(){}
+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()
--- a/Interface/Interface.hpp	Thu Apr 11 18:12:31 2019 +0000
+++ b/Interface/Interface.hpp	Mon May 06 22:13:28 2019 +0000
@@ -9,12 +9,13 @@
 
 
 extern Serial PC;    //TX, RX
+extern Serial Board; //TX, RX
 extern TextLCD Lcd; // rs, e, d4-d7
 //extern DigitalOut On_board_led;//Onboard LED
 class INTERFACE
 {
     public://Public member functions and variables
-    INTERFACE();
+    INTERFACE(PinName N1, PinName N2, PinName N3, PinName N4, PinName N5, PinName N6, PinName N7, PinName N8, PinName N9, PinName N10, PinName N11);
     ~INTERFACE();
     void Init();
     int Post();
@@ -26,6 +27,28 @@
     //Public Variabls
     
     private://Private member functions and variables
+    //Inputs
+    
+    //Rotary Encoder
+    DigitalIn _Rotary_Encoder_A;//N1
+    DigitalIn _Rotary_Encoder_B;//N2
+    DigitalIn _Rotary_Encoder_Button;//N3
+    
+    
+    //Buttons
+    DigitalIn _Button_1;//N4
+    DigitalIn _Button_2;//N5
+    DigitalIn _Button_3;//N6
+  
+    //MOSFET Safety Pin
+    DigitalOut _MOSFET_Safety;//Active low N7
+    
+    //Shift Register Control
+    DigitalOut _Shift_SCLK;//N8
+    DigitalOut _Shift_Latch;//N9
+    DigitalOut _Shift_Enable;//N10
+    DigitalOut _Shift_Data;//N11
+
     
     //Private Functions
     
--- a/Post/Post.cpp	Thu Apr 11 18:12:31 2019 +0000
+++ b/Post/Post.cpp	Mon May 06 22:13:28 2019 +0000
@@ -1,8 +1,8 @@
 #include "Post.hpp"
 POWER POWER_1(PA_10,PA_11,PB_0,PB_1);
-INTERFACE INTERFACE_1;
+INTERFACE INTERFACE_1(PC_13,PC_14,PC_15,PB_9,PB_8,PB_5,PB_4,PA_15,PA_12,PA_11,PA_10);//Rotary encoderA, Rotary Encoder B, Rotary encoder button, button 1, button 2, button 3, MOSFET safety, shift sclk, shift latch, shift enable, shift in
 SCHEDULES SCHEDULES_1;
-FEEDBACK FEEDBACK_1;
+FEEDBACK FEEDBACK_1(PA_0,PA_3,PA_2,PA_3,PB_0,PB_1,PA_7,PA_6,PA_5,PA_4);
 void POST()
 {
     if(POWER_1.Post() == 1)//Success
--- a/Power/Power.hpp	Thu Apr 11 18:12:31 2019 +0000
+++ b/Power/Power.hpp	Mon May 06 22:13:28 2019 +0000
@@ -17,10 +17,10 @@
     
 private:    
     
-    DigitalOut Muscle_1;
-    DigitalOut Muscle_2;
-    DigitalOut FEEDBACK_1;
-    DigitalOut FEEDBACK_2;
+    DigitalIn Muscle_1;
+    DigitalIn Muscle_2;
+    DigitalIn FEEDBACK_1;
+    DigitalIn FEEDBACK_2;
 
 };
 #endif//_POWER_HPP_
\ No newline at end of file