jled icon indicating copy to clipboard operation
jled copied to clipboard

Add Custom hal example for PCA9685 PWM breakout board

Open samjt opened this issue 3 years ago • 3 comments

This is an example for using a PWM extender board.

My c++ is pretty amateurish, so there are probably some things to change.

One issue is that the PCA board sets brightness across a higher resolution than jled (4096 levels instead of 256). I think this is the reason there is some flickering during fades, but I’m not sure how to correct it. At the moment I’m just doing map(val, 0, 255, 0,4095) in the analogWrite call.

samjt avatar Jul 10 '22 19:07 samjt

Thanks for the contribution! However, in order to make an executable example, it still needs some polishing. Since I've a PCA9685 somewhere around, I can take care of that and take your work as a starting point. Also I would like to put the example in a separate repository, since it has additionals dependencies (the PCA9685 driver - which I don't want to add to JLed). See https://github.com/jandelgado/jled-example-switch-sequence for an example.

jandelgado avatar Jul 17 '22 19:07 jandelgado

Coverage Status

Coverage remained the same at 96.97% when pulling f3b359e90bb9bcf6124e8f2377d95d50364b61b4 on samjt:patch-1 into 9b657ace7363bc1b8cc1f4f528019efbf26f6bed on jandelgado:master.

coveralls avatar Jul 17 '22 19:07 coveralls

Sure, I thought that would be the case but I don’t think I can open a pr to start a new repo. Feel free to close

samjt avatar Jul 21 '22 06:07 samjt

@samjt: I have added a new library with a PCA9685 HAL: https://github.com/jandelgado/jled-pca9685-hal/

See the repo for usage examples / documentation.

jandelgado avatar Oct 01 '22 19:10 jandelgado

Amazing, and great detailed documentation, thank you.

samjt avatar Oct 02 '22 04:10 samjt