![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
PROJ515-MASTER-No-PWM
Dependencies: mbed mbed-rtos ShiftReg2 TextLCD
Diff: Control/Control.cpp
- Revision:
- 5:dbb984e01ded
- Parent:
- 4:020f93d35f6e
--- 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