Paso 5: Software de receptor:
Yazılım Geliştirme por Robimek-2015
Yazılım Lisans por Robimek
www.robimek.com
#include < SoftwareSerial.h >
#define BT_SERIAL_TX 4
#define BT_SERIAL_RX 3
SoftwareSerial BluetoothSerial(BT_SERIAL_TX, BT_SERIAL_RX);
#include < Servo.h >
Servo myservo;
Servo myservo; char val = ' ';
void setup()
{
Serial.Begin(9600);
BluetoothSerial.begin(9600);
myservo.Attach(10);
}
void loop()
{
Si (BluetoothSerial.available() > 0)
{
Val = BluetoothSerial.read();
int servoAng = val-'0';
myservo.Write(servoAng);
}
}