Thank you so much for all your help Pete!
I posted the code I have for controlling the speed of the servos a few posts back. The portion of the code where I physically input a value for speed is in the 3rd tab "loop", where I can change the 'servoSpeed[roll]= 1;' section.
The code I have for the sensor is listed below:
const int pingPin = 11;
unsigned int duration, inches;
void setup() {
Serial.begin(9600);
}
void loop() {
pinMode(pingPin, OUTPUT); // Set pin to OUTPUT
digitalWrite(pingPin, LOW); // Ensure pin is low
delayMicroseconds(2);
digitalWrite(pingPin, HIGH); // Start ranging
delayMicroseconds(5); // with 5 microsecond burst
digitalWrite(pingPin, LOW); // End ranging
pinMode(pingPin, INPUT); // Set pin to INPUT
duration = pulseIn(pingPin, HIGH); // Read echo pulse
inches = duration / 74 / 2; // Convert to inches
Serial.println(inches); // Display result
delay(200); // Short delay
}
I hope thats all you need, let me know if I didn't express myself specifically enough at any stage
Thanks again,
Mike