PCA9685
Moderators: leecollings, remb0
-
- Posts: 88
- Joined: Tuesday 24 February 2015 16:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
PCA9685
hi,
is there a way to control this module from Domoticz on a Raspi ?
https://www.adafruit.com/product/815
Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685
it's I2C so in theory it should be possible ... anyone knows how to do it ?
is there a way to control this module from Domoticz on a Raspi ?
https://www.adafruit.com/product/815
Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685
it's I2C so in theory it should be possible ... anyone knows how to do it ?
RasPi2 - Aeotec Z-Stick S2 - Fibaro multisensors - Fibaro RGBW dimmers - ETH08 relais boards
-
- Posts: 88
- Joined: Tuesday 24 February 2015 16:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: PCA9685
nobody ?
or any other way to add extra PWM ports to a Raspi ?
I need 8 additional PWM outputs ...
or any other way to add extra PWM ports to a Raspi ?
I need 8 additional PWM outputs ...
RasPi2 - Aeotec Z-Stick S2 - Fibaro multisensors - Fibaro RGBW dimmers - ETH08 relais boards
-
- Posts: 88
- Joined: Tuesday 24 February 2015 16:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: PCA9685
any other way to add extra PWM ports to a Raspi ?
RasPi2 - Aeotec Z-Stick S2 - Fibaro multisensors - Fibaro RGBW dimmers - ETH08 relais boards
-
- Posts: 88
- Joined: Tuesday 24 February 2015 16:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: PCA9685
I'm still waiting to expand the amount of PWM pins on my RasPi using this board ...
any way of controlling this I2C board ?
(maybe by scripting ?)
any way of controlling this I2C board ?
(maybe by scripting ?)
RasPi2 - Aeotec Z-Stick S2 - Fibaro multisensors - Fibaro RGBW dimmers - ETH08 relais boards
-
- Posts: 247
- Joined: Sunday 29 November 2015 20:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.9639
- Location: Spain
- Contact:
Re: PCA9685
You could use the python module for that https://github.com/adafruit/Adafruit_Ci ... on_PCA9685
And then setup like this.
PCA9685 <--> python <--> domoticz
And then setup like this.
PCA9685 <--> python <--> domoticz
-
- Posts: 88
- Joined: Tuesday 24 February 2015 16:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: PCA9685
ok, I've downloaded Adafruit driver but what would these python scripts look like, I'm a complete noob in coding ...
would appreciate some help ...
would appreciate some help ...
elmortero wrote: ↑Tuesday 21 April 2020 11:37 You could use the python module for that https://github.com/adafruit/Adafruit_Ci ... on_PCA9685
And then setup like this.
PCA9685 <--> python <--> domoticz
RasPi2 - Aeotec Z-Stick S2 - Fibaro multisensors - Fibaro RGBW dimmers - ETH08 relais boards
-
- Posts: 247
- Joined: Sunday 29 November 2015 20:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.9639
- Location: Spain
- Contact:
Re: PCA9685
Sorry, can't help you there. DOn't have the boards myself.
I had a quick look at the manual, looks like with no previous experience (and google of course) should be possible to figure it out.
Might have to spend some time on it.
Good luck
I had a quick look at the manual, looks like with no previous experience (and google of course) should be possible to figure it out.
Might have to spend some time on it.
Good luck
-
- Posts: 88
- Joined: Tuesday 24 February 2015 16:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: PCA9685
could anybody give me a hand (or some usefull tips) on setting this up ?
I'm really a noob in coding ...
I'm really a noob in coding ...
RasPi2 - Aeotec Z-Stick S2 - Fibaro multisensors - Fibaro RGBW dimmers - ETH08 relais boards
-
- Posts: 88
- Joined: Tuesday 24 February 2015 16:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
PCA9685
progress update :
I've installed the Adafruit library on my Raspi and connected the board to the I2C bus ...
... and it appears to be working !
I can control the PWM outputs with the demo-scripts that came with the library, when running these scripts directly in Raspi.
I run them by using the command : "python3 pca9685_simpletest.py"
leds go on and off on the PWM board ... all parameters are working ... seems responsive ...
The next step is connecting these python scripts to Domoticz devices, so I copied the script to /home/pi/domoticz/scripts/python/pca9685_simpletest.py so Domoticz can reach it ...
I tried in the "On action" : "script:///home/pi/domoticz/scripts/python/pca9685_simpletest.py"
it doesn't respond, and when I look in the log, I see the error :
"Error executing script command (/home/pi/domoticz/scripts/python/pca9685_simpletest.py). returned: 32256"
what am I doing wrong ?
if you are one of the many python code-wizards on this forum, could you set me on my way, I would be forever gratefull !
I'm a complete newbie/noob at coding and python, but very eager to learn ... sorry !
Thanks in advance !
I've installed the Adafruit library on my Raspi and connected the board to the I2C bus ...
... and it appears to be working !
I can control the PWM outputs with the demo-scripts that came with the library, when running these scripts directly in Raspi.
I run them by using the command : "python3 pca9685_simpletest.py"
leds go on and off on the PWM board ... all parameters are working ... seems responsive ...
The next step is connecting these python scripts to Domoticz devices, so I copied the script to /home/pi/domoticz/scripts/python/pca9685_simpletest.py so Domoticz can reach it ...
I tried in the "On action" : "script:///home/pi/domoticz/scripts/python/pca9685_simpletest.py"
it doesn't respond, and when I look in the log, I see the error :
"Error executing script command (/home/pi/domoticz/scripts/python/pca9685_simpletest.py). returned: 32256"
what am I doing wrong ?
if you are one of the many python code-wizards on this forum, could you set me on my way, I would be forever gratefull !
I'm a complete newbie/noob at coding and python, but very eager to learn ... sorry !
Thanks in advance !
RasPi2 - Aeotec Z-Stick S2 - Fibaro multisensors - Fibaro RGBW dimmers - ETH08 relais boards
-
- Posts: 88
- Joined: Tuesday 24 February 2015 16:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: PCA9685
awesome, it works !!!
THANKS a million !
... learning all the time
this board has 16 PWM outputs, so I can dim 16 LED channels ...
should I now make 16 scripts (32 actually, 1 for ON and 1 for OFF) and link to them from Domoticz devices, or is there a way to controll all in 1 "central" script ?
THANKS a million !
... learning all the time
this board has 16 PWM outputs, so I can dim 16 LED channels ...
should I now make 16 scripts (32 actually, 1 for ON and 1 for OFF) and link to them from Domoticz devices, or is there a way to controll all in 1 "central" script ?
RasPi2 - Aeotec Z-Stick S2 - Fibaro multisensors - Fibaro RGBW dimmers - ETH08 relais boards
-
- Posts: 88
- Joined: Tuesday 24 February 2015 16:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: PCA9685
or can I use the dimmer function ?
I read somewhere that there are 2 kinds of scripts in Domoticz : device scripts and time scripts ... "script_device_demo.py" and "script_time_demo.py"
so should I create a python script for each device, and having it read out the dimmer value of that Domoticz device and sending this (calculated to HEX value) to the output of the appropriate PWM channel ?
in this way I could use 1 script per device and immediately use it as a dimmer, instead of just an on/off switch ... right ?
how should I script this then ?
I read somewhere that there are 2 kinds of scripts in Domoticz : device scripts and time scripts ... "script_device_demo.py" and "script_time_demo.py"
so should I create a python script for each device, and having it read out the dimmer value of that Domoticz device and sending this (calculated to HEX value) to the output of the appropriate PWM channel ?
in this way I could use 1 script per device and immediately use it as a dimmer, instead of just an on/off switch ... right ?
how should I script this then ?
RasPi2 - Aeotec Z-Stick S2 - Fibaro multisensors - Fibaro RGBW dimmers - ETH08 relais boards
Who is online
Users browsing this forum: No registered users and 1 guest