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 MODSERIAL FATFileSystem
Diff: PololuHbridge/PololuHBridge.hpp
- Revision:
- 62:d502889e74f1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PololuHbridge/PololuHBridge.hpp Mon Jun 18 14:45:37 2018 +0000
@@ -0,0 +1,23 @@
+#ifndef POLOLUHBRIDGE_HPP
+#define POLOLUHBRIDGE_HPP
+
+#include "mbed.h"
+
+class PololuHBridge
+{
+public:
+ PololuHBridge(PinName pwm, PinName dir, PinName reset);
+
+ void run(float cmd);
+ void reset();
+ void stop();
+
+protected:
+ PwmOut _pwm;
+ DigitalOut _direction;
+ DigitalOut _rst;
+ float _p;
+ float _clamp(float value, float min, float max);
+};
+
+#endif
\ No newline at end of file