Servo motor sg90 and pca9685


#1

Hi there ! i just start with raspberry pi3 and cayenne . for now just playing with sensors and wires looking what i can get. anyway i want to connect servo motor sg90 by pca9685. first thing i couldnt add pca9685 to cayenne , so i used cayenne plugin from github wich add me to dashboard 8 channels from 0 to 7 … why only 8 ? what about rest of them ? . i were trying to connect sg90 to gpio and by the pca9685 without success . need help please what am i doing wrong ?


#2

Can you try this? Add to the bottom of cayenne-pca9685.plugin I haven’t tested it but I don’t see why it wouldn’t work. Let me know if it doesn’t and I’ll dig mine out to test it.

[PCA9685_CH8]
enabled=true
inherit=PCA9685_CH0
channel=8

[PCA9685_CH9]
enabled=true
inherit=PCA9685_CH0
channel=9

[PCA9685_CH10]
enabled=true
inherit=PCA9685_CH0
channel=10

[PCA9685_CH11]
enabled=true
inherit=PCA9685_CH0
channel=11

[PCA9685_CH12]
enabled=true
inherit=PCA9685_CH0
channel=12

[PCA9685_CH13]
enabled=true
inherit=PCA9685_CH0
channel=13

[PCA9685_CH14]
enabled=true
inherit=PCA9685_CH0
channel=7

[PCA9685_CH15]
enabled=true
inherit=PCA9685_CH0
channel=15

#3

cheers Adam, that’s it , it was missing in this plugin, file were ending with channel 7. Thank you ! can you tell me why i cant add pca9685 to cayenne is it just for arduino not for raspberry then ?


#4

I’m confused by the second part of your reply, it kind of contradicts the first. Is it working? If you just meant why do the higher channels not exist, I’m sure it’s just a bug. If you confirm it does work I’ll make a pull request to fix it.


#5

Sorry Adam. i were trying to add new device > extension>pca9685 but im not able to select device (theres nothing to pick its greyed), then i start diging and found on github plugin (https://github.com/myDevicesIoT/cayenne-plugin-pca9685.git) wich add me 8 channels straight to dashboard . but as i said its not possibile to add it as a new device . is it make any sense to you now ? and yes Ive got all 15 channels now on dashboard after restarting


#6

Ah, I understand now. add new device > extension>pca9685 really needs to be removed as it’s not supported any more. The way we did it here is the new supported way and I’ll do a pull request for it to be updated. @shramik_salgaonkar can we get that removed?


#7

@Bartezzz This has been fixed on the github page as well.


#8

thanks @adam will look into it. @Bartezzz have you got your servo working with cayeen.


#9

Hi there. No , not yet. I will try later on today. Thing is probably I don’t know how (yet) connect it by pca9685 . Wrong word, I know how to connect servo to the pca9685 but didn’t see any option to control it.