Yes i already add buttons to my cayenne still no work
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,
-
Remove all the devices that are added to your cayenne dashboard.
-
Add a new device by navigating to
add new ---> devices/widget ---> Arduino
you will land up on a screen showing the MQTT credentials. -
on your raspberry pi terminal enter the following command:
cd Cayenne-MQTT-Python
python3 setup.py install
4.create a new file usingsudo nano test.py
-
Copy and paste the following code.
Untitled.txt (1.5 KB)
-
Add the MQTT credentials from cayenne dashboard into your code.
-
Run the code using
sudo python3 test.py
-
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. -
If everything is fine then you should be able to control the servo with the button.
-
do similar for second servo and led.
try sudo python3 setup.py install
cd examples
sudo nano Example-03-CayenneClient.py
add your MQTT credentials and run it using sudo python3 Example-03-CayenneClient.py
i dont think you followed this steps.
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.