So I got a MPU6050 getting some data in Ax. angle Degree and as the servo is in degree to
i wrote a simple mapping code:
int servoYax = map(compAngleY, -60, 60, 30, 150);
myservo.write(servoYax);
Now as you know I can get exact angle of the servo by code.
My question is:
1. Can I get back from the servo angle degrees? for example to spin the servo and get
data on my serial monitor. Is that possible?
2. How can I filter my servos so they don't have that noise (not sound) but electric pulce noise,
what I mean making them "smooth movement". I don't really have problem with that but just asking. Could I add a cap or something?
Enjoy (not my video)
Here is a nice video how to make that but with pot's
It doesn't know. The arduino just sends a command signal on a pin. The arduino doesn't even know if a servo is connected to it or not.
Fig. 1.1 SG90 (inside)
So then it's all about the inside micro chip and pot. The arduino chip for example send (90 deg) so
after that the inside servo chip read the arduino and read the pot inside the servo and spin it
right in the exact angle.
Correct, there is no feedback from the servo. The only way to get feedback would be to take it apart run another wire from the pot back to Arduino and figure out position based off of analogRead values...
The only way to get feedback would be to take it apart run another wire from the pot back to Arduino and figure out position based off of analogRead values...
Yea that would be useful but only in the case you don't have a 2nd pot.