1

Revision:
0:8380ab528739
Child:
2:9164b1d0b53d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BallastController.cpp	Sat Mar 05 01:50:19 2016 +0000
@@ -0,0 +1,58 @@
+/* #####################################################################
+                               SD20.cpp
+                               --------
+                
+                          Surface Ship, Group 5
+                          ---------------------
+ 
+ Written by:        Steven Kay
+ 
+ Date:              February 2016
+ 
+ Function:          This 
+ 
+ Version:           1.0
+ 
+ Version History
+ ---------------
+ 
+ 1.1                rgdfgdfgdfggdfgdg
+ 
+ 1.0                gdgddfdddgd
+    
+ ##################################################################### */
+
+#include "mbed.h"
+#include "BallastController.h"
+
+
+BallastController::BallastController(   PinName S1_D,PinName S1_CLK,
+                                        PinName S2_D,PinName S2_CLK, 
+                                        PinName S3_D,PinName S3_CLK, 
+                                        PinName S4_D,PinName S4_CLK     )
+{
+    Solenoids[0] = new Latch_FET_Driver(S1_D,S1_CLK);
+    Solenoids[1] = new Latch_FET_Driver(S2_D,S2_CLK);  
+    Solenoids[2] = new Latch_FET_Driver(S3_D,S3_CLK);  
+    Solenoids[3] = new Latch_FET_Driver(S4_D,S4_CLK);  
+}
+
+void BallastController::Test()
+{
+    BallastController::Solenoids[0] -> changeOutputState(1);
+    BallastController::Solenoids[1] -> changeOutputState(1);
+    
+    //for(int a = 0; a < 4; a++)
+//    {
+//        BallastController::Solenoids[a] -> changeOutputState(1);
+//    }
+//    
+//    wait(2);
+//    
+//    for(int a = 0; a < 4; a++)
+//    {
+//        BallastController::Solenoids[a] -> changeOutputState(0);
+//    }   
+}
+    
+    
\ No newline at end of file