clearwater / SwitecX25

Arduino library for Switec X25.168 and friends
http://clearwater.github.com/gaugette/
Other
128 stars 44 forks source link

Added interface to allow loading of user acceleration table: setAccelTable() #31

Open crashkopf opened 9 months ago

crashkopf commented 9 months ago

I wrote a patch to install a user-configured acceleration table.

Example usage:

#include <SwitecX25.h>
SwitecX25 motor1(STEPS,4,5,6,7);
SwitecX25::AccelTable myAccelTable[] = {
  {5, 12000},
  {10, 6000},
  {20, 3000}
};

void setup(void)
{
  motor1.setAccelTable(myAccelTable);
  motor1.zero();
}