Servo

yes, it is correct. i know you are using raspberry pi but i told you to add an arduino so that you can get the MQTT credential to add in the python script.


How about this one? It says unauthorized

I already added the mqtt credential to my code

can you check if the MQTT credentials are correct and there are no typo.

When i add the arduino it changes the client id but the mqtt username and passwords are still the same shall i continue with the new client id

for a account the username and password remains same only the client id changes for each new device added to that account.

Everything is working now thanks a lot
But now i need my servo to turn 720 degrees anf im using the code that you had given can you help me modify it so that it will turn 720


This is the code that i use and i need it to turn 720
Help please

in the code change SetAngle(90) to SetAngle(170) and hopefully it should work.

I use the code that you had given me now my servo turns 90 and then it continue to turn it doesnt go back to its original degrees? Can you help me

what do mean, after reaching 90 degree it turns continuously like an dc motor?

Yes

And since my servo is just 180 degrees when i continue to click the servo it stuck. Because instead of turning back to 0 position it continue turning after the position of 90

then it is hardware issue, where your servo acts like dc motor.

Thanks can you help me calibrate a stepper motor

follow this tutorial and get the stepper working first Overview | Adafruit's Raspberry Pi Lesson 10. Stepper Motors | Adafruit Learning System

I need to add this to my cayenne that will give an output of
0=0
1=540 degrees

Lets back up a bit here…Steppers are not servos and vice versa. What you showed in your last pic appears to be a stepper. Steppers are used to rotate to a distance with very high precision (for example some sort of motion for a carriage) and servos are used to rotate to an angle with very high precision (for example steering on a remote car). So what do you have and what are you trying to do?

1 Like