25 lines
359 B
Arduino
25 lines
359 B
Arduino
/*
|
|
set the current position as middle.
|
|
*/
|
|
|
|
#include <SCServo.h>
|
|
|
|
SMS_STS st;
|
|
|
|
// the uart used to control servos.
|
|
// GPIO 18 - S_RXD, GPIO 19 - S_TXD, as default.
|
|
#define S_RXD 18
|
|
#define S_TXD 19
|
|
|
|
void setup()
|
|
{
|
|
Serial1.begin(1000000, SERIAL_8N1, S_RXD, S_TXD);
|
|
st.pSerial = &Serial1;
|
|
delay(1000);
|
|
}
|
|
|
|
void loop()
|
|
{
|
|
st.CalibrationOfs(1);
|
|
while(1);
|
|
} |