Added the pin outs

Dependencies:   mbed mbed-rtos ShiftReg TextLCD

Files at this revision

API Documentation at this revision

Comitter:
thomasmorris
Date:
Thu Apr 11 11:37:39 2019 +0000
Parent:
3:3700f0c29710
Child:
5:20decc99e50c
Commit message:
A very classy affair

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
Schedules/Schedules.cpp Show annotated file Show diff for this revision Revisions of this file
Schedules/Schedules.hpp Show annotated file Show diff for this revision Revisions of this file
Setup.hpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Feedback/Feedback.cpp	Thu Apr 11 11:37:39 2019 +0000
@@ -0,0 +1,14 @@
+#include "Feedback.hpp"
+
+FEEDBACK::FEEDBACK(){}
+FEEDBACK::~FEEDBACK(){}
+void FEEDBACK::Init(){}
+int FEEDBACK::Post()//Power on self test
+{
+    return 1;//Success
+}
+
+void FEEDBACK_test()
+{
+    sleep();    //Do something here
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Feedback/Feedback.hpp	Thu Apr 11 11:37:39 2019 +0000
@@ -0,0 +1,34 @@
+#ifndef _FEEDBACK_HPP_
+#define _FEEDBACK_HPP_
+
+#include "mbed.h"
+#include "rtos.h"
+#include "TextLCD.h"
+
+//Libraries and header file includes
+
+
+extern Serial PC;    //TX, RX
+extern TextLCD Lcd; // rs, e, d4-d7
+
+class FEEDBACK
+{
+    public://Public member functions and variables
+    FEEDBACK();
+    ~FEEDBACK();
+    void Init();
+    int Post();
+    void FEEDBACK_test();
+    //Public Functions
+    
+    //Public Variabls
+    
+    private://Private member functions and variables
+    
+    //Private Functions
+    
+    //Private Variables
+    
+    
+};
+#endif //_FEEDBACK_
\ No newline at end of file
--- a/Interface/Interface.cpp	Wed Apr 10 11:33:32 2019 +0000
+++ b/Interface/Interface.cpp	Thu Apr 11 11:37:39 2019 +0000
@@ -1,7 +1,7 @@
 #include "Interface.hpp"
 //Define the variables here
 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
+TextLCD Lcd(PB_12, PB_13, PB_14, PB_15, PA_8, PA_9); // rs, e, d4-d7
 
 
 INTERFACE::INTERFACE(){}
@@ -19,4 +19,12 @@
         Thread::wait(1000);
     }
 }
+void INTERFACE::LCD()
+{
+    while(1)
+    {
+        Lcd.printf("Testing\nINTERFACE");
+        Thread::wait(1000);   
+    }   
+}
 
--- a/Interface/Interface.hpp	Wed Apr 10 11:33:32 2019 +0000
+++ b/Interface/Interface.hpp	Thu Apr 11 11:37:39 2019 +0000
@@ -9,7 +9,7 @@
 
 
 extern Serial PC;    //TX, RX
-extern TextLCD LCD; // rs, e, d4-d7
+extern TextLCD Lcd; // rs, e, d4-d7
 
 class INTERFACE
 {
@@ -19,6 +19,7 @@
     void Init();
     int Post();
     void Serial();
+    void LCD();
     //Public Functions
     
     //Public Variabls
--- a/Post/Post.cpp	Wed Apr 10 11:33:32 2019 +0000
+++ b/Post/Post.cpp	Thu Apr 11 11:37:39 2019 +0000
@@ -9,6 +9,6 @@
     }
     if(INTERFACE_1.Post() == 1)//Success
     {
-        PC.printf("POWER Post pass\n");   
+        PC.printf("Interface Post pass\n");   
     }
 }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Schedules/Schedules.cpp	Thu Apr 11 11:37:39 2019 +0000
@@ -0,0 +1,16 @@
+#include "Schedules.hpp"
+
+SCHEDULES::SCHEDULES(){}
+SCHEDULES::~SCHEDULES(){}
+void SCHEDULES::Init(){}
+int SCHEDULES::Post()
+{
+    return 1;//Success   
+}
+void SCHEDULES::Schedules_output()
+{
+    while(1)
+    {
+        //Do somthing   
+    }   
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Schedules/Schedules.hpp	Thu Apr 11 11:37:39 2019 +0000
@@ -0,0 +1,34 @@
+#ifndef _SCHEDULES_HPP_
+#define _SCHEDULES_HPP_
+
+#include "mbed.h"
+#include "rtos.h"
+#include "TextLCD.h"
+
+//Libraries and header file includes
+
+
+extern Serial PC;    //TX, RX
+extern TextLCD Lcd; // rs, e, d4-d7
+
+class SCHEDULES
+{
+    public://Public member functions and variables
+    SCHEDULES();
+    ~SCHEDULES();
+    void Init();
+    int Post();
+    void Schedules_output();
+    //Public Functions
+    
+    //Public Variabls
+    
+    private://Private member functions and variables
+    
+    //Private Functions
+    
+    //Private Variables
+    
+    
+};
+#endif //_INTERFACE_HPP_
\ No newline at end of file
--- a/Setup.hpp	Wed Apr 10 11:33:32 2019 +0000
+++ b/Setup.hpp	Thu Apr 11 11:37:39 2019 +0000
@@ -11,6 +11,8 @@
 #include "Interface.hpp"
 #include "Power.hpp"
 #include "Post.hpp"
+#include "Schedules.hpp"
+#include "Feedback.hpp"
 //Digital Outputs
 extern DigitalOut myled;    //Onboard LED
 
@@ -21,5 +23,7 @@
 //ShiftReg SR1(PA_12, PA_11, PA_10);    //data, store, clock
 
 static Thread Serial_Thread;
-
+static Thread LCD_Thread;
+static Thread LED_Thread;
+static Thread Schedules_Thread;
 #endif //_SETUP_HPP_
--- a/main.cpp	Wed Apr 10 11:33:32 2019 +0000
+++ b/main.cpp	Thu Apr 11 11:37:39 2019 +0000
@@ -2,24 +2,19 @@
 
 DigitalOut myled(PC_13);
 void Serial_Function(){INTERFACE_1.Serial();}//Written inside the interface class and Serial function
-
+void LCD_Function(){INTERFACE_1.LCD();}//LCD output
+void Onboard_Led(){while(1){myled = !myled; Thread::wait(1000);}}
+void Schedules_Function(){/*SCHEDULES.Schedules_output();*/}//Fix this
 int main()
 {   
     POST();//Run Power on self test
     Serial_Thread.start(Serial_Function);
+    LCD_Thread.start(LCD_Function);
+    LED_Thread.start(Onboard_Led);
+    Schedules_Thread.start(Schedules_Function);
     while(1)
     {
         myled = 1; // LED is ON
-        //Muscle0 = 1;
-        wait(1); // 200 ms
-        
-        
-        myled = 0; // LED is OFF
-        //Muscle0 = 0;
-        wait(1); // 1 sec
-        
-       // PC.printf("%.6f  %.6f\n\r",FEEDBACK_0.read(),FEEDBACK_1.read());
-        //LCD.printf("Hello World!\n");
-        
+        Thread::wait(500);
     }
 }