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.
Fork of ELEC351_Group_T by
STEPPER_MOTOR.hpp
00001 /* 00002 This is the stepper motor class and is used to control all of the motors individually 00003 */ 00004 #ifndef STEPPER_MOTOR_HPP//Header Guards Prevents Multiple includes 00005 #define STEPPER_MOTOR_HPP 00006 //Libraries and header includes 00007 #include "THREADS.hpp" 00008 #include "mbed.h" 00009 #include "rtos.h" 00010 #include "SERIAL.hpp" 00011 class STEPPER_MOTOR //This creates a class called Led 00012 { 00013 public: 00014 STEPPER_MOTOR(PinName STEP, PinName DIRECTION); //Constructor 00015 ~STEPPER_MOTOR(); //Destructor 00016 void Permanent_Rotate(); 00017 void Permanent_Rotate_clock_wise(); 00018 void Permanent_Rotate_anti_clock_wise(); 00019 void Rotate_90(); 00020 void Rotate_Steps(int Steps, int Direction); 00021 private: 00022 //Private member variables to prevent them being accessed externally 00023 //Data Pins 00024 int _Number_of_steps; 00025 DigitalOut _STEP; //Step 00026 DigitalOut _DIRECTION; //Direction 00027 }; 00028 #endif//STEPPER_MOTOR_HPP 00029 00030 //Object creations 00031 00032
Generated on Tue Jul 12 2022 22:52:51 by
