Присваивают h_servo.write(); и w_servo.write(50);
Читай предыдущее сообщение
попробуй вот так
PHP код:
#include <Servo.h>
Servo h_servo, v_servo;
String readString;
char c;
int ang,pos;
int hr, vr;
void setup()
{
h_servo.attach(9);
v_servo.attach(10);
Serial.begin(115200);
v_servo.write(60);
h_servo.write(20);
}
void loop() {
while (Serial.available()) {
c = Serial.read(); //gets one byte from serial buffer
switch (c) {
case 't': //////////////////////////////////////////////////////////////////
v_servo.write(60);
delay(500);
h_servo.write(20);
delay(500);
h_servo.write(50);
readString = "";
ang = 0;
c = '0';
Serial.print("ttYes! "); Serial.println(ang);
hr = h_servo.read();
Serial.print("hr1 "); Serial.println(hr);
vr = v_servo.read();
Serial.print("vr1 "); Serial.println(vr);
delay(1000);
break;
}
readString += c; //makes the string readString
delay(2); //slow looping to allow buffer to fill with next character
ang = readString.toInt(); //convert readString into a number
}
}