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.
Dependencies: mbed DRV88255 TextLCD Ping mbed-rtos
Diff: PIDController.h
- Revision:
- 32:1e4919a44196
- Parent:
- 29:2b256a7ce0ae
- Child:
- 35:c9261391a995
--- a/PIDController.h Tue Jun 14 10:51:15 2016 +0000
+++ b/PIDController.h Tue Jun 14 11:12:44 2016 +0000
@@ -2,9 +2,17 @@
#define __PIDCONTROLLER_H__
#include "mbed.h"
+#include "DRV8825.h"
+#include "stdio.h"
#include "SensorController.h"
+#define MAX_SPEED 8000
+#define MICROSTEPS_PER_STEP 16
+
+#define LEFT 1
+#define RIGHT 0
+
class PIDController : public Controller {
@@ -26,6 +34,16 @@
SensorController *salt;
SensorController *proximity;
+ void pump_salt_water(int ml);
+
+ void pump_fresh_water(int ml);
+
+ void pump_water(DRV8825 *mtr, int ml);
+
+ float getMlSaltyWater(float, float);
+
+ float getMlFreshWater(float, float);
+
};