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
Diff: TB6612.h
- Revision:
- 3:f70ecf1e21d5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/TB6612.h Sat Nov 23 10:06:03 2019 +0000
@@ -0,0 +1,30 @@
+/**
+ * Motor Driver TB6612 Control Library
+ *
+ * -- TB6612 is a device of the rohm.
+ *
+ * Copyright (C) 2012 Junichi Katsu (JKSOFT)
+ */
+
+#ifndef MBED_TB6612_H
+#define MBED_TB6612_H
+
+#include "mbed.h"
+
+class TB6612 {
+public:
+ TB6612(PinName pwm, PinName fwd, PinName rev);
+ void speed(int speed);
+ void move(int speed , int time);
+ void operator= ( int value )
+ {
+ speed(value);
+ }
+
+protected:
+ PwmOut _pwm;
+ DigitalOut _fwd;
+ DigitalOut _rev;
+};
+
+#endif
\ No newline at end of file