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

CmdListObjects/TObjects.h

Committer:
botdream
Date:
2012-04-16
Revision:
0:8b3857d4ce02

File content as of revision 0:8b3857d4ce02:

//---------------------------------------------------------------------------------------------
#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;
  };  
};
//---------------------------------------------------------------------------------------------