#include <Servo.h>
Servo servoL;
Servo servoR;
int inByte;
void setup()
{
Serial.begin(9600);
servoL.attach (5);
servoR.attach (6);
}
void loop()
{
if(Serial.available() > 0)
{
inByte = Serial.read();
control();
}
}
void control()
{
switch(inByte)
{
case 'a':
servoLeft();
break;
----------------------Continued---------------------------
void servoLeft()
{
servoR.write(99);
servoL.write(120);
return;
}
Here's my code the way you suggested btw, wasn't sure if you could see it the way i originally posted it or not, but this is my current set up...