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
Diff: CmdListObjects/TObjects.h
- Revision:
- 0:8b3857d4ce02
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CmdListObjects/TObjects.h Mon Apr 16 09:41:53 2012 +0000 @@ -0,0 +1,52 @@ +//--------------------------------------------------------------------------------------------- +#include "mbed.h" +//--------------------------------------------------------------------------------------------- +#define internaldebug +//--------------------------------------------------------------------------------------------- +class TObjects +{ + private: + + public: + + TObjects(); +}; +//--------------------------------------------------------------------------------------------- + +class TObjectStep +{ + private: + + public: + static const uint8_t typecode = 0x01; + uint32_t nsteps; + uint32_t deltatime; + uint8_t direction; + + TObjectStep(uint32_t insteps, uint32_t ideltatime, uint8_t idirection) + { + nsteps = insteps; + deltatime = ideltatime; + direction = idirection; + + #ifdef internaldebug + printf("->->TObjectStep(%d,%d,%d).\r\n",nsteps,deltatime,direction); + #endif + }; +}; +//--------------------------------------------------------------------------------------------- + +class TObjectWait +{ + private: + + public: + static const uint8_t typecode = 0x04; + uint32_t waittime; + + TObjectWait(uint32_t iwaittime) + { + waittime = iwaittime; + }; +}; +//--------------------------------------------------------------------------------------------- \ No newline at end of file