Generic Step Motor WebInterface - control a step motor using a Pololu A4983 driver from a webinterface (EXPERIMENTAL PROTOTYPE - just to be used as a proof-of-concept for a IoT talk, will not be updating this code so often)

Dependencies:   EthernetNetIf RPCInterface mbed HTTPServer

Committer:
botdream
Date:
Mon Apr 16 09:41:53 2012 +0000
Revision:
0:8b3857d4ce02

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
botdream 0:8b3857d4ce02 1 //---------------------------------------------------------------------------------------------
botdream 0:8b3857d4ce02 2 // Class to interface Pololu A4983 Stepper Motor Driver
botdream 0:8b3857d4ce02 3 // http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=358&currency=EUR
botdream 0:8b3857d4ce02 4 // https://www.pololu.com/file/download/a4983_DMOS_microstepping_driver_with_translator.pdf?file_id=0J199
botdream 0:8b3857d4ce02 5 //---------------------------------------------------------------------------------------------
botdream 0:8b3857d4ce02 6 class A4983
botdream 0:8b3857d4ce02 7 {
botdream 0:8b3857d4ce02 8 //-------------------------------------------------------------------------------------------
botdream 0:8b3857d4ce02 9 private:
botdream 0:8b3857d4ce02 10 //-------------------------------------------------------------------------------------------
botdream 0:8b3857d4ce02 11
botdream 0:8b3857d4ce02 12 //-------------------------------------------------------------------------------------------
botdream 0:8b3857d4ce02 13 public:
botdream 0:8b3857d4ce02 14 //-------------------------------------------------------------------------------------------
botdream 0:8b3857d4ce02 15 uint8_t f_motor_enable; // flag to Enable/Disable Step Motor, 0 => Disable, 1 => Enable
botdream 0:8b3857d4ce02 16 uint8_t f_motor_direction; // flag for the Step Motor direction, 0 => Normal, 1 => Inverted
botdream 0:8b3857d4ce02 17 float k_delay; // delay constant in seconds (Step Motor Speed) [0.0001;0.000025]
botdream 0:8b3857d4ce02 18 //-------------------------------------------------------------------------------------------
botdream 0:8b3857d4ce02 19 A4983();
botdream 0:8b3857d4ce02 20
botdream 0:8b3857d4ce02 21 void adjust_microstepping_mode(uint8_t factor);
botdream 0:8b3857d4ce02 22 void singlestep();
botdream 0:8b3857d4ce02 23 void sleep(bool value);
botdream 0:8b3857d4ce02 24 void looprun();
botdream 0:8b3857d4ce02 25 void loopstart();
botdream 0:8b3857d4ce02 26 void loopstop();
botdream 0:8b3857d4ce02 27 };
botdream 0:8b3857d4ce02 28 //---------------------------------------------------------------------------------------------