GithubHelp home page GithubHelp logo

Bit Banging Not Working about apa102-pi HOT 9 CLOSED

tinue avatar tinue commented on June 29, 2024
Bit Banging Not Working

from apa102-pi.

Comments (9)

tinue avatar tinue commented on June 29, 2024

Is it bitbang or hardware SPI that you want to use? Also, I think you use the API the"old" way, and this no longer works.
For SPI bus 1 (2nd bus), you would use:
strip = apa102.APA102(num_led=5, spi_bus=1)

I can't test at the moment, but I think with the above initialisation it should work.

from apa102-pi.

Lee-Stratford avatar Lee-Stratford commented on June 29, 2024

from apa102-pi.

tinue avatar tinue commented on June 29, 2024

Can't say I understand it, but when I check the source code of the Adafruit library that lies underneath of apa102-pi, it appears that you need to use spi_bus number 6 for pins 38/40. Please give this a try.
It's most likely a typo in their library...

from apa102-pi.

Lee-Stratford avatar Lee-Stratford commented on June 29, 2024

from apa102-pi.

tinue avatar tinue commented on June 29, 2024

I fixed the typo in the Adafruit library, and now it's working on SPI bus 1. If I get to it I'll raise a pull request with them to get it fixed.
In the meantime, the file to edit is:
.venv/lib/python3.9/site-packages/adafruit_blinka/microcontroller/bcm2711/pin.py

That is if you installed as recommended into a virtual env. Otherwise you will have to find the file by yourself.

At the end of the file you will see the spiPorts definition. Simply change the 6 to a 1 and save.

from apa102-pi.

Lee-Stratford avatar Lee-Stratford commented on June 29, 2024

from apa102-pi.

Lee-Stratford avatar Lee-Stratford commented on June 29, 2024

from apa102-pi.

tinue avatar tinue commented on June 29, 2024

Good to hear. Adafruit accepted by pull request a long time ago. Possibly if you get their latest version of the library, the issue is gone without patching.
About the "hardwares pi": Please check the "debug" branch. The output will not be there.

from apa102-pi.

tinue avatar tinue commented on June 29, 2024

This should no longer be an issue, because the Adafruit libraries have been updated.

from apa102-pi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.