Servo Motor Control using by Mobile


What's App Group:- https://chat.whatsapp.com/I4Nv0YEt1hK3Z9EVjsvngh

👨🏻‍💻 Code :- 

/*

code started

#define servo= 11;

#define rx= 2;

#define tx= 3;

code created by technical idEas 

https://youtube.com/c/TechnicalidEas07

*/

#include<SoftwareSerial.h>

#include <Servo.h>

Servo myservo;

SoftwareSerial mySerial(2, 3); // RX, TX

int Position ;

void setup()

{

  myservo.attach(11);

  mySerial.begin(9600);

  Serial.begin(9600);

}

void loop()

{

 if(mySerial.available()>0)

 {

  Position = mySerial.read();

  Position = map(Position, 0, 180, 180, 0);

  myservo.write(Position);

 }

}          


Instagram ID :-  https://www.instagram.com/technical_ideas_07/


APPLICATION :-  https://drive.google.com/file/d/1AQJ29gRVOFhm1Ap1BkEbRWKg_pvEbvAX/view?usp=drivesdk

SUBSCRIBE NOW :- https://youtube.com/channel/UCCJyR_wnt3SxhErsSUP9Wrw 🥺

Comments

Post a Comment

Popular posts from this blog

Servo Motor Control Using By Bluetooth HC-05

Best IOT Project By Technical idEas