-
Notifications
You must be signed in to change notification settings - Fork 13
adding alternative TLC59711Multi driver implementation #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
by inlining functions :-( faster: 0.16ms per pixel
by only checking value range once
more inlinening..
to if with helpfull messages
@FoamyGuy
unfortunately i did not find my Adafruit TLC59711 Breakoutboard :-( the most significant difference between the two for us here is the Data-Transfer-Speed:
so this should make no difference on the outcome with the given example code. for the test i renamed the lib to lib_ so that i am sure there are no other versions used.
my
here are the two tests results as photos: i try to find my TLC59711 Adafruit Breakout board tomorrow.. i have to think about what it would take to correct the pixel order... |
and add file global disables. (inline disable would not make sens to fix the undefined-variable and invalid-name multiple times in my opinion.)
hmpf the black formating is failing again. so are you planing on upgrading the black in the Build CI test? |
Yes. But honestly, only because you brought this to my attention. We pinned My suggestion for now is to force reinstall |
happy new year to you all!! all fine.
to later upgrade to the latest version you can use
(source) |
@s-light this file has https://github.com/s-light/Adafruit_CircuitPython_TLC59711/blob/multi/examples/tlc59711_fancyled.pdf @kattni I was not able to get the examples to run successfully with the new version of the library. Looks like s-light has custom breakouts that may be a bit different than the Adafruit ones perhaps, that is the only guess I have as to the difference in behavior between them and myself. I wonder if it may be possible to get one of the Adafruit breakouts into s-light's hands so they could try these changes out directly on that device. I've got my circuit still put together stashed away so I can pull it out to re-test any time. But I don't really have any other ideas for troubleshooting at this time. |
@s-light Please email me at kattni@adafruit.com. Thanks! |
the pdf should be py - sorry... (fixed) i have extended my search for my adafruit breakout board. and luckily i found it :-) so i have done a second test here. testsetuphw
code i used
resultsoriginalmultiso for me it is working fine. Open QuestionsOnly thing open (i think):
Level-Shiftingas i followed the guide for setting up the test- i just questioned myself if i have overlooked something regarding the Digital-Signal Levels and uC with 3.3V logic -
and sadly the board connects the TLC59711 VCC to the V+ (+15 in schematics). i just ignored this fact now for the test setup and followed the instructions. |
i can check on the confilcits next week...
|
I tested this successfully with two TLC59711 breakouts and can control LEDs connect to both breakouts. Everything seems to be working as intended for me now. I do think it would be great if we could offer some way to use the index order that matches the silkscreen on the Adafruit breakout, but I don't know if that is a strict requirement. @kattni do you have thoughts on this? The one other thing I noticed is that the docs don't seem to include the API information any more, and they only have one of the example scripts listed. Here are the docs built locally from this PR: and here are the ones live now: Thanks again for all your work on this @s-light! this is a great new feature to support multiple devices chained together! |
@s-light OK - we are SO close! I was going to resolve the merge conflicts myself through GitHub but the conflicts in adafruit_tlc59711.py are more complicated than I expected. You're the one best suited to resolve them as you know what you added. Is this something you can get fixed up? We can address the documentation in another issue/PR. Once the conflicts are resolved, I want to get this merged. Thank you so much for sticking through this! @FoamyGuy I don't think it's a strict requirement - I would say file an issue, and consider simply closing it, so the issue is there if anyone searches for it, and someone can make a request there if desired. |
@kattni I could take a look to the documentation once is merged, if that is ok, |
@jposada202020 That would be brilliant! Keep an eye on this PR for when it's merged and then take a look. |
Will do already pin in my inbox :) |
@kattni i think i have resolved all the conflicts - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😃 🎉 |
@s-light Thanks :) |
Updating https://github.com/adafruit/Adafruit_CircuitPython_ADXL34x to 1.11.8 from 1.11.7: > Merge pull request adafruit/Adafruit_CircuitPython_ADXL34x#29 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_APDS9960 to 2.2.7 from 2.2.6: > Merge pull request adafruit/Adafruit_CircuitPython_APDS9960#29 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_AS726x to 2.0.5 from 2.0.4: > Merge pull request adafruit/Adafruit_CircuitPython_AS726x#16 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO055 to 5.3.1 from 5.3.0: > Merge pull request adafruit/Adafruit_CircuitPython_BNO055#81 from jposada202020/improving_docs > Merge pull request adafruit/Adafruit_CircuitPython_BNO055#80 from GuenterQ/master Updating https://github.com/adafruit/Adafruit_CircuitPython_FXAS21002C to 2.1.8 from 2.1.7: > Merge pull request adafruit/Adafruit_CircuitPython_FXAS21002C#22 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_FXOS8700 to 2.1.7 from 2.1.6: > Merge pull request adafruit/Adafruit_CircuitPython_FXOS8700#23 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_GPS to 3.9.0 from 3.8.1: > Merge pull request adafruit/Adafruit_CircuitPython_GPS#62 from lesamouraipourpre/minimum_sentence_size > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_ICM20X to 2.0.7 from 2.0.6: > Merge pull request adafruit/Adafruit_CircuitPython_ICM20X#12 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_L3GD20 to 2.3.5 from 2.3.4: > Merge pull request adafruit/Adafruit_CircuitPython_L3GD20#22 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS2MDL to 2.1.9 from 2.1.8: > Merge pull request adafruit/Adafruit_CircuitPython_LIS2MDL#13 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS331 to 1.0.5 from 1.0.4: > Merge pull request adafruit/Adafruit_CircuitPython_LIS331#3 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH to 5.1.10 from 5.1.9: > Merge pull request adafruit/Adafruit_CircuitPython_LIS3DH#68 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3MDL to 1.1.10 from 1.1.9: > Merge pull request adafruit/Adafruit_CircuitPython_LIS3MDL#16 from jposada202020/master > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM303_Accel to 1.1.7 from 1.1.6: > Merge pull request adafruit/Adafruit_CircuitPython_LSM303_Accel#11 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM303DLH_Mag to 1.1.8 from 1.1.7: > Merge pull request adafruit/Adafruit_CircuitPython_LSM303DLH_Mag#13 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS1 to 2.1.8 from 2.1.7: > Merge pull request adafruit/Adafruit_CircuitPython_LSM9DS1#29 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_MLX90393 to 2.0.6 from 2.0.5: > Merge pull request adafruit/Adafruit_CircuitPython_MLX90393#28 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_MMA8451 to 1.3.7 from 1.3.6: > Merge pull request adafruit/Adafruit_CircuitPython_MMA8451#17 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_MPU6050 to 1.1.7 from 1.1.6: > Merge pull request adafruit/Adafruit_CircuitPython_MPU6050#16 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_MSA301 to 1.2.7 from 1.2.6: > Merge pull request adafruit/Adafruit_CircuitPython_MSA301#15 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_TCS34725 to 3.3.7 from 3.3.6: > Merge pull request adafruit/Adafruit_CircuitPython_TCS34725#35 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_TLC59711 to 2.0.0 from 1.2.6: > Merge pull request adafruit/Adafruit_CircuitPython_TLC59711#17 from jposada202020/master > Merge pull request adafruit/Adafruit_CircuitPython_TLC59711#5 from s-light/multi > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_VCNL4010 to 0.10.8 from 0.10.7: > Merge pull request adafruit/Adafruit_CircuitPython_VCNL4010#18 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_VCNL4040 to 1.2.6 from 1.2.5: > Merge pull request adafruit/Adafruit_CircuitPython_VCNL4040#13 from jposada202020/improving_docs > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_AzureIoT to 2.4.0 from 2.3.5: > Merge pull request adafruit/Adafruit_CircuitPython_AzureIoT#31 from jimbobbennett/master Updating https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font to 1.5.0 from 1.4.1: > Merge pull request adafruit/Adafruit_CircuitPython_Bitmap_Font#46 from jposada202020/master > Merge pull request adafruit/Adafruit_CircuitPython_Bitmap_Font#43 from jposada202020/raise_error_no_boundingbox > Merge pull request adafruit/Adafruit_CircuitPython_Bitmap_Font#45 from FoamyGuy/simpletest_example Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Shapes to 2.1.0 from 2.0.8: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Shapes#37 from jposada202020/new_example_circle > Merge pull request adafruit/Adafruit_CircuitPython_Display_Shapes#36 from empirical-dan/patch-2 Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_Layout to 1.9.2 from 1.9.1: > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_Layout#36 from jposada202020/solving_parameters
adds TLC59711Multi
→ this new Implementation is multi-chip aware.
the API is compatible with FancyLED (similar to the neopixel/dotstar).
It has a bunch of different options to set pixel values - these have different speed results.
i have add a
examples/tlc59711_multi_dev.py
file with some speed comparisons.the direct list setter
pixels[pixel_index] = color
supports float and int as tuple / list with auto conversion and extended error raising (reports what goes wrong and why)this way its a little slower than the unprotected alternatives:
the fastest one is
pixels.set_pixel_16bit_value(pixel_index, value_r, value_g, value_b)
this way the user can use the method that fits his application best..
all tests were done with 128 Pixel (= 32 chips)
pleas let me know what you think about this.