Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:8380ab528739, committed 2016-03-05
- Comitter:
- sk398
- Date:
- Sat Mar 05 01:50:19 2016 +0000
- Child:
- 1:b1edfc95570c
- Commit message:
- Controller based on the Latch_FET_Driver class, shall be used to control the operation of the robot's ballast tanks and provide timing functions to accurately control air flow.
Changed in this revision
--- /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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/BallastController.h Sat Mar 05 01:50:19 2016 +0000
@@ -0,0 +1,53 @@
+/* #####################################################################
+ 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 "Latch_FET_Driver.h"
+
+#ifndef BALLAST_CONTROLLER
+#define BALLAST_CONTROLLER
+
+ class BallastController
+{
+
+public:
+
+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 );
+
+void Test();
+private:
+
+protected:
+
+Latch_FET_Driver *Solenoids[4];
+//Latch_FET_Driver *Solenoid2;
+//Latch_FET_Driver *Solenoid3;
+//Latch_FET_Driver *Solenoid4;
+
+};
+
+#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Latch_FET_Driver.lib Sat Mar 05 01:50:19 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/sk398/code/Latch_FET_Driver/#073ee2fd1245