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.
stepmotor.h
00001 #ifndef STEP_MOTOR_H 00002 #define STEP_MOTOR_H 00003 00004 #include "mbed.h" 00005 00006 class stepmotor { 00007 public: 00008 00009 stepmotor(PinName in1, PinName in2, PinName in3, PinName in4); 00010 void step(uint32_t num_steps,bool cw); 00011 void set_speed(int speed); 00012 uint32_t get_speed(); 00013 private: 00014 BusOut motor_out; 00015 uint32_t motorSpeed; 00016 int8_t nstep; 00017 00018 void move(); 00019 }; 00020 00021 #endif
Generated on Tue Jul 12 2022 12:32:58 by
