Servo

Yes i already add buttons to my cayenne still no work

And im also stuck here

Hold on, do you know what you are doing? there are two different ways to install cayenne for raspberry pi. One using cayenne agent, which is the one you are using and the second one is using cayenne MQTT python library. And it looks like you are combining both of them.
So to start fresh,

  1. Remove all the devices that are added to your cayenne dashboard.

  2. Add a new device by navigating to add new ---> devices/widget ---> Arduino you will land up on a screen showing the MQTT credentials.

  3. on your raspberry pi terminal enter the following command:
    cd Cayenne-MQTT-Python
    python3 setup.py install
    4.create a new file using sudo nano test.py

  4. Copy and paste the following code.

    Untitled.txt (1.5 KB)

  5. Add the MQTT credentials from cayenne dashboard into your code.

  6. Run the code using sudo python3 test.py

  7. On your cayenne dashboard add a new button add new---->device/widgets--->actuator---->generic --->digital output fill in all the detail with channel 5 selected.

  8. If everything is fine then you should be able to control the servo with the button.

  9. do similar for second servo and led.


I have encountered another problem


The 2 are my problems

try sudo python3 setup.py install

It worked but now my problem is this

cd examples
sudo nano Example-03-CayenneClient.py

add your MQTT credentials and run it using sudo python3 Example-03-CayenneClient.py

Its now running thanks a lot but my cayenne says its offline


How am i going to turn on my device

i dont think you followed this steps.

The connection is taking so long

i repeat again. did you follow this steps?

Hi can you tell the right connection of pins of pca9685 to raspberry pi 3
The lights are working now but my servo still isnt

the above is not using PWM extension, it is connected to GPIO directly.

So the servo pins are connected to the gpio?

if it is a small servo then it can be powered from the GPIO itself but the pi cannot power large servo. You will need as external power supply.

Im using a tower pro mg995 servo

that wont work, you will need a external power supply.