//== SERVO SETTINGS =========================================
//Scott Edwards  SSC
//------------------
//Serial INPUT...............RS-232, OR inverted TTL/CMOS, 9600 OR 2400, N81   - 9600 fot T% electronics
//Servo OUTPUT connector ....3-PIN header, 0.1"spacing: (PWM)(+V)(GND)
//Pulse frequency.....................................˜60 Hz
//[Pulsewidth range (normal) ..........................1.0 TO 2.0 ms]
//Pulsewidth range (Mini SSC II, “R” jumper ON) ......0.5 TO 2.5 ms     - omly setting for T5 electronics
//Pulsewidth at startup (centered) ...................1.5 ms
//[Pulsewidth resolution (normal)......................4 µs    1ms = 2.016ms    0.36°/unit (90°/250)]
//Pulsewidth resolution (Mini SSC II, “R” jumper ON)..8 µs    0.5ms - 2.53ms   0.72°/unit (180°/250)

// TecArm5

const byte servos =5;
const byte lastServo =4;

//Waist
const byte Wmin0 = 11; //right 90
const byte W90R0 = 11; //right 90
const byte Wmid0 =119; 
const byte W90L0 =226; //left 90
const byte Wmax0 =254; //left ~110
//Shoulder
const byte Smin1 = 40; //upper-arm back forearm hits body
const byte Sver1 = 97; //upper-arm vertical
const byte Smid1 =194; //upper-arm horizontal
const byte Smax1 =223; //upper-arm forward hits waist servo
//Elbow
const byte Emin2 = 29; //forearm down bent hits body
const byte E90d2 = 90; //forearm down bent @90
const byte Emid2 =189; //arm straight
const byte Emax2 =252; //forearm up servo stop
//HandPitch
const byte HPmin3 = 21; //hand down @90
const byte HP90D3 = 21; //hand down @90
const byte HPmid3 =126; //wrist straight
const byte HP90U3 =236; //hand up @90
const byte HPmax3 =236; //hand up @90
//Grip
const byte Gmin4 = 51; //pressure plates switch contact
const byte GinC4 = 51; //pressure plates switch contact
const byte GinT4 = 61; //pressure plates touch flat
const byte GinH4 = 65; //fingers home
const byte Gout4 =173; ///max open fingers hit frame
const byte Gmax4 =173; //max open fingers hit frame

const byte Shome[]   ={Wmid0,Smin1,Emin2,HP90D3,GinH4};
const byte Sready[]  ={Wmid0,Sver1,E90d2,HPmid3,GinH4};    
const byte SEstart[] ={128,128,128,128,128};

//===========================================================
