hmm, that post is a bit elderly and there are some syntax changes if you’re using the latest version of arduino because newsoftserial is built in, not a separate library.
also i’m a she
from https://github.com/nouyang/18-servo-hexapod/blob/master/pololu_aug17-2012.pde
the relevant changes are:
#include <SoftwareSerial.h>
#define txPin 2
#define rxPin 3
SoftwareSerial mySerial(rxPin, txPin);
void settarget(unsigned char servo, unsigned int target)
{
target = map(target, 0, 180, 2400, 9500);
mySerial.write(0xAA); //start byte
mySerial.write(0x0C) ; //device id
mySerial.write(0x04); //command number
mySerial.write(servo); //servo number
mySerial.write(target & 0x7F);
mySerial.write((target >> 7) & 0x7F);
}