Servo

I am new to this app. I figured out how to turn on and off a LED but now I would like to control a servo motor. I realize that it doesn’t work just to add a servo as an actuator for some reason. I guess I could have it work as a light switch actuator but idk how to make that work.
Long story short, how can I control a servo with cayenne

which device are you using raspberry pi (with cayenne pi agent) or arduino ?

Raspberry pi 3

there are two ways to do this:

  1. Add a pca9685 plugin to your cayenne pi agent and then modify the plugin code to work with servo motor. https://github.com/myDevicesIoT/cayenne-plugin-pca9685
  2. Use adafruit servo example code https://github.com/adafruit/Adafruit_Python_PCA9685/blob/master/examples/simpletest.py and add the cayenne python example code https://github.com/myDevicesIoT/Cayenne-MQTT-Python/tree/master/examples. this is much easier as just combine the two examples.

do i really need to add pca9685 to my hardware components to run a servo? or can i just use a mqqt? thanks

https://developers.mydevices.com/cayenne/docs/cayenne-mqtt-api/
this two will make you understand the difference between them.

im sorry im just a beginner, but i really need to connect my two servo motor, 2 lights and a camera is this possible using cayenne? thank you so much and im using a raspberry pi 3b

yes, it is possible with cayenne. But you need PCA9685 extension board to connect it to pi.

thank you helps a lot

1 Like

Im sorry but may i ask how can i put a camera on my cayenne im using the raspberry pi camera thank you

do you want to show the raspberry pi camera video on the cayenne dashborad (which is not possible) or do you want to capture an image when a button is pressed on the cayenne dashboard have a look at this Take picture when motion with Pi 3 and Agent 2.0 CayenneMQTTClient() and notify by email - how to trigger a script on Pi 3

I need a button on my cayenne dashboard that can access the camera on my raspberry pi. Is it even possible?

isnt, this what you want?

I think it only shows the capture image if motion is detected
But i need a live video status of my camera. Is it possible?

are you familiar with python? you will have to modify the code to take photo.

Can you give me some configuration thank you so much

this library to connect to cayenne https://github.com/myDevicesIoT/Cayenne-MQTT-Python and this for raspberry pi camera https://picamera.readthedocs.io/en/release-1.13/. you need to combine both the code.

Thank you for the help i will follow everything you told me.