Arduino Bluetooth İle Servo Motor Kontrol

Kodla Büyü

Mesut AKGÜN

Aktif Üye
Mesajlar
279
Medya Linki: https://www.bilgisayarbilisim.net/media/bluetooth-ile-servo-motor-kontrolu.138/

Devre Şeması:
Untitled Sketch_bb.jpg


Arduino Kod:

Kod:
#include <SoftwareSerial.h>
#include <Servo.h>
Servo myservo;
int bluetoothTx = 10;
int bluetoothRx = 11;
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
void setup()
{
  myservo.attach(9);
  Serial.begin(9600);
  bluetooth.begin(9600);
}
void loop()
{
  if(bluetooth.available()> 0 )
  {
    int servopos = bluetooth.read();
    Serial.println(servopos);
    myservo.write(servopos);
  }
}

Android Apk Dosyası Ektedir.
 

Ekli dosyalar

Son düzenleme:
BBNET
Geri
Üst