PROJ515-MASTER-No-PWM

Dependencies:   mbed mbed-rtos ShiftReg2 TextLCD

Files at this revision

API Documentation at this revision

Comitter:
thomasmorris
Date:
Wed May 08 09:39:42 2019 +0000
Parent:
4:020f93d35f6e
Commit message:
Working code not PWM;

Changed in this revision

Control/Control.cpp Show annotated file Show diff for this revision Revisions of this file
Serial/Serial_Board.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 020f93d35f6e -r dbb984e01ded Control/Control.cpp
--- a/Control/Control.cpp	Tue May 07 21:55:57 2019 +0000
+++ b/Control/Control.cpp	Wed May 08 09:39:42 2019 +0000
@@ -6,7 +6,7 @@
 int Data = 0;
 void Control_Main()//This is where the control of the board will be run from, just to not have all of the code inside of the main
 {
-    Control_Shift_Regs(0xF0F0,20);//Pass in the muscle and fan selection along with the PWM
+    Control_Shift_Regs(0xF0F0,2);//Pass in the muscle and fan selection along with the PWM
 }
 void Control_Shift_Regs(uint16_t Selection, int PWM)//Controling the output of the shift registers
 {
@@ -19,11 +19,10 @@
     PWM_off_time = PWM_off_time - PWM;
     while(1)
     {
-        SR.Write(0x0000);//All off
         SR.Write(Selection);//Turn the selection on
-        Thread::wait(PWM_on_time);//20ms on
+        //Thread::wait(100);//20ms on
         SR.Write(0x0000);
-        Thread::wait(PWM_off_time);//80ms off
+        //Thread::wait(100);//80ms off
     }
 }
 void Control_Post()//The POST function runs here
diff -r 020f93d35f6e -r dbb984e01ded Serial/Serial_Board.cpp
--- a/Serial/Serial_Board.cpp	Tue May 07 21:55:57 2019 +0000
+++ b/Serial/Serial_Board.cpp	Wed May 08 09:39:42 2019 +0000
@@ -3,7 +3,7 @@
 SERIAL_BOARD::SERIAL_BOARD()//Constructor
 {
     _POST_Value_Mutex.lock();
-    _POST_Value = 77;//Need a post test value to get a echo confirm
+    _POST_Value = 66;//Need a post test value to get a echo confirm
     _POST_Value_Mutex.unlock();
     _Received_Data_Mutex.lock();
     _Received_Data = 0;//Set data to 0