Skip to content
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

unused RPi GPIO pins get reset #7

Open
PHimmel opened this issue Aug 21, 2021 · 5 comments
Open

unused RPi GPIO pins get reset #7

PHimmel opened this issue Aug 21, 2021 · 5 comments

Comments

@PHimmel
Copy link

PHimmel commented Aug 21, 2021

Hello Marc,

Firstly, thank you for putting together this awesome program! I love running these beautiful graphics on my RPi4.

I currently have a SMPS (to power the matrices) connected to a solid state relay. The relay is connected to pin 40 , for ground, and pin 29, to set the state of the relay. When I run any of the sample programs in example/, it sets 29 from 1 to 0. This occurs both when it initializes and when the command is keyboard interrupted, or if it is suspended. This puts the relay in an inactive state and turns off the SMPS.
The demos/ in the hzeller library (which your software is in-part build off of, I believe) do not do this.

I skimmed over this core repository, as well as your related repos, and haven't found a specific reference to pin manipulation. So I was wondering where this code might be located.

Thanks again Marc!

-Peter

@marcmerlin
Copy link
Owner

Hi, glad that this lib is of interest to you.
Damn, that is perplexing, I'm honestly not sure why this is happening, nothing in my glue code touches GPIOs, and arduinoonpc wasn't even written for rPi, so it doesn't touch any GPIOs either.
My guess is that it has to be the rpi-rgb-panel lib, and that you have it configured in a way that it uses multiple channels. That library uses every single GPIO on 3 channels, so this is likely an initialization difference and it's blindly sending signals to other GPIOs you aren't using for panels

@PHimmel
Copy link
Author

PHimmel commented Aug 23, 2021

Thanks for the quick reply 👍
Okay, and where is that lib?

@marcmerlin
Copy link
Owner

how do you initialize the matrix, using neomatrix_config? Please show me that code and/or confirm how many channels in parallel you init

@PHimmel
Copy link
Author

PHimmel commented Aug 24, 2021

Yes, that's what I'm using to initialize. Here's my neomatrix_config.h file and the specific line setting the parallel number to 2:
https://github.com/PHimmel/matrix_control/blob/56e10096c305a0ddff4fd8bb00716739c8bac216/neomatrix_config.h#L1045

@marcmerlin
Copy link
Owner

Ok, try

  1. Add #pragma message "hello" to that block, to make sure it is being selected by ifdef
  2. set parallel to 1

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

No branches or pull requests

2 participants