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.
Diff: Step_Motor.h
- Revision:
- 0:1b7dd931c028
- Child:
- 1:6fe876825b57
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Step_Motor.h Thu May 03 15:07:53 2018 +0000
@@ -0,0 +1,21 @@
+#ifndef STEP_MOTOR_H
+#define STEP_MOTOR_H
+
+#include "mbed.h"
+
+class stepmotor {
+public:
+
+ stepmotor(PinName in1, PinName in2, PinName in3, PinName in4, PinName in5,PinName in6, PinName in7, PinName in8);
+ void step(uint32_t num_steps,uint8_t cw);
+ void set_speed(int speed);
+ uint32_t get_speed();
+private:
+ BusOut motor_out;
+ uint32_t motorSpeed;
+ int32_t nstep,nstep2;
+ uint8_t mot2;
+ void move();
+};
+
+#endif
\ No newline at end of file