Moves back and forth, demonstrating speed commands.
#include <SoftwareSerial.h>
#define TX_PIN 11
#define RX_PIN 10
SoftwareSerial SerialPort(RX_PIN, TX_PIN);
void setup()
{
SerialPort.begin(9600);
SerialPort.listen();
K1.start();
K1.home().wait();
}
void loop()
{
long minimum = K1.getMin().value();
long maximum = K1.getMax().value();
long speed = (maximum - minimum) / 10;
K1.s(speed).wait();
delay(5000);
K1.s(-speed).wait();
delay(5000);
}