Powers down a controller channel after moving. This is useful when free (as opposed to controlled) motion is acceptable.
#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();
K1.p(minimum).wait();
K1.powerDown();
delay(5000);
long maximum = K1.getMax().value();
K1.p(maximum).wait();
K1.powerDown();
delay(5000);
}