How to make Blynk rotate a servo

I am trying to make a smart door lock using Arduino where when I push a button on my phone using Blynk a servo rotates, and I can’t figure out how to do it and I haven’t found anything online that could help. Can anyone help please?

Strongly depends on the servo. Does it use an incremental or absolute encoder? Most continuous rotating servos are just DC motors with encoders attached, so you’ll propably need a hardware driver as well.

There are plenty of exemples in the web.

What doesn’t work exactly?
Does the servo move correctly with a simple sketch like: file > examples > servo > sweep?
If you want the servo to move to a specific position wehenever a blynk button is pressed, you need to learn how virtual pins work and how to manupulate them.

The servo I’m using is a Standard Size - High Torque - Metal Gear Servo, Tower Pro MG995R

I want to try and get my servo to rotate 90 degrees when I press a button and rotate back to its original position when I press the button again. I’ve tried using digital pins since I don’t really know how virtual pins work.

Post the code you have so far.

Virtual pins are probably a good way to go - check out the Blynk examples to see how they work.

I haven’t made any code for it, but I will most likely try the code from this example someone put in the forum.

[Blynk Example Browser]

My goal is to make the servo rotate 90 degrees and back when I press a button on blynk.

It’s a good start. Remember to choose the right board and connection method you are using.
Good luck :wink:

I am trying the example you had put and it does not seem to work.

I am trying to rotate a servo using a slider from an example code found here:

(Blynk Example Browser)

I followed all the steps, I put in the necessary information ran it and nothing happened. Can anyone help?

@teddy2s6, please do not cross-post. Threads merged.

Only if you can provide more information. So far all you have said is “I did what I was told and nothing happened”.
So unless you show us exactly what you have done we can’t help.

For a start a good clear photograph or two showing your wiring would help. What also would help is if you tried to run a simple servo example and not bother with anything else, so that you know your servo works.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.