Servo Motor Control Via Bluetooth With Potentiometer
by sezgingul in Circuits > Arduino
22306 Views, 60 Favorites, 0 Comments
Servo Motor Control Via Bluetooth With Potentiometer
In this project, we will make the servo motor control with potentiometer via bluetooth.
Two will make the Arduino board via bluetooth wireless haberleştirerek control. Manages one of the modules for this (master) while the other managed (slaves) must be in mode. For both the master and the slave module settings, please click the link below.
http://www.robimek.com/hc-05-ile-hc-06-bluetooth-modullerin-haberlesmesi/
Materials:
- 2 Number Arduino (Nano enough)
- servo-motor
- 10k potentiometer
- Hc-05 Bluetooth Module
- Hc-06 Bluetooth Module
Transmitter Circuit:
Let's connect the signal pins to the analog potentiometer 0 pins.
Hc-05 Bluetooth module 4.p the tx pin, RX pin of the 3.pi to my tie.
Receiver Circuit:
10.pin let's connect the servo signal to the pin.Hc-06 module TX to RX pin of the pin 4.pin 3.pin to my tie.
Transmitter Software:
//Yazılım Geliştirme By Robimek – 2015
//Yazılım Lisans By 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);
İnt potpin = A0;
int val;
void setup()
{
Serial.begin(9600);
BluetoothSerial.begin(9600);
}
void loop()
{
val = analogRead(potpin);
val = map(val, 0, 1023, 0, 179);
BluetoothSerial.print(val);
delay(100);
}
Receiver Software:
//Yazılım Geliştirme By Robimek – 2015
//Yazılım Lisans By 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()
{
if (BluetoothSerial.available()>0)
{
val = BluetoothSerial.read();
int servoAng = val – ‘0’;
myservo.write(servoAng);
}
}
Finally
After installing the software, you can manage your power engine now wirelessly via a potentiometer.
More Information: http://www.robimek.com/potansiyometre-ile-bluetooth-uzerinden-servo-motor-kontrolu/