Skip to content

Adafruit_CircuitPython_74HC595: Added support for multiple shift registers #17

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

Merged
merged 4 commits into from
Apr 14, 2021

Conversation

davidleedom
Copy link
Contributor

I simply changed the single byte used to send to the shift register into an array. Then mapped pin values greater than 7 to the next byte. So you will see value of _byte_pos which is the element of the byte array and _byte_pin which is the bit in the _byte_pos element.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! Just a couple suggestions. We'll want to release this as a new version number because gpio will return a bytearray instead of an int now.

davidleedom and others added 3 commits April 12, 2021 20:37
I'm new to Python.  Makes sense to me.

Co-authored-by: Scott Shawcroft <[email protected]>
I did not know this.

Co-authored-by: Scott Shawcroft <[email protected]>
I didn't really understand what this was doing in the original code, but I thought I'd just keep it.

Co-authored-by: Scott Shawcroft <[email protected]>
@tannewt
Copy link
Member

tannewt commented Apr 13, 2021

Did you test the latest version? I don't always make perfect edits...

Copy link
Contributor Author

@davidleedom davidleedom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have accepted all your changes. I also applied them to my local copy and tested them in my project which is using four shift registers. It all appears to work just fine.

@davidleedom
Copy link
Contributor Author

I think I completed everything, but being this is more first Pull Request experience I might be missing something.

@davidleedom
Copy link
Contributor Author

davidleedom commented Apr 14, 2021 via email

@tannewt
Copy link
Member

tannewt commented Apr 14, 2021

I have accepted all your changes. I also applied them to my local copy and tested them in my project which is using four shift registers. It all appears to work just fine.

That's exactly what I had hoped. Thanks!

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit 143262c into adafruit:master Apr 14, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 16, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_74HC595 to 1.3.0 from 1.2.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_74HC595#17 from davidleedom/patch-1
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_SHT4x to 1.0.4 from 1.0.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_SHT4x#4 from jposada202020/improving_docs
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_FunHouse to 1.1.2 from 1.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_FunHouse#8 from makermelissa/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal to 2.3.0 from 2.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_MatrixPortal#75 from adafruit/rp2040
@Chao8219 Chao8219 mentioned this pull request Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants