RGB Matrix Hat for PI and buttons
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- bujones
- Posts: 14
- Joined: Wed Jun 03, 2015 9:32 am
RGB Matrix Hat for PI and buttons
When I run the script and press a button sometimes it works sometimes it triggers the reset code as if I pressed the reset button. All the buttons are set for falling edge detection with internal pull-up resistors. I tested the same script on a bare Pi and they work perfectly.
I am powering the hat and the Pi with separate power supplies. 5V 4A for the hat and 5V 2A for the Pi.
I have attached the Python script.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: RGB Matrix Hat for PI and buttons
4A is not necessarily enough for a 32x64. Those could draw up to 8A, depending on how many pixels you have lit and how bright they are.
Do you have these problems if you dim the pixels, or reduce the number of lit pixels?
Do you have these problems if you dim the pixels, or reduce the number of lit pixels?
- bujones
- Posts: 14
- Joined: Wed Jun 03, 2015 9:32 am
Re: RGB Matrix Hat for PI and buttons
I have been doing further testing and I have the same problem if I just try to read the buttons without doing anything with the Matrix. Planning to hook up an Arduino to monitor the pins to see if the voltage drops since I don't have an oscope. Will keep testing.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: RGB Matrix Hat for PI and buttons
Seems like it must be a brownout of some kind. can't think of why it happens, though.
- bujones
- Posts: 14
- Joined: Wed Jun 03, 2015 9:32 am
Re: RGB Matrix Hat for PI and buttons
After further testing I do not see any drop in voltage below 3.2v. All solder connections look good. Never see a drop in voltage when all less are on.Not sure where to go from here.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: RGB Matrix Hat for PI and buttons
The only other thing I can think of is a short-circuit. If you disconnect the HAT, then you don't get the resets?
- bujones
- Posts: 14
- Joined: Wed Jun 03, 2015 9:32 am
Re: RGB Matrix Hat for PI and buttons
Removed HAT and verified buttons work with the PI. Tested HAT on a different PI with same results. Checked and verified all solder connections are solid with no shorts. Any other thoughts?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: RGB Matrix Hat for PI and buttons
I don't know. You have the buttons wired to ground?
Can you post some pictures?
Can you post some pictures?
- bujones
- Posts: 14
- Joined: Wed Jun 03, 2015 9:32 am
Re: RGB Matrix Hat for PI and buttons
Here are pictures of the connections.
- adafruit2
- Posts: 22149
- Joined: Fri Mar 11, 2005 7:36 pm
Re: RGB Matrix Hat for PI and buttons
thats...pretty weird. its almost certainly something in the matrix scanning code that doesnt let you also access the buttons outside the program.
one solution that isnt *great* but will work if you can spare the arduino, connect the buttons to the arduino and have it spit out the button number pressed on the Serial port, then you can use pyserial on the Pi to read the number pressed.
one solution that isnt *great* but will work if you can spare the arduino, connect the buttons to the arduino and have it spit out the button number pressed on the Serial port, then you can use pyserial on the Pi to read the number pressed.
- bujones
- Posts: 14
- Joined: Wed Jun 03, 2015 9:32 am
Re: RGB Matrix Hat for PI and buttons
Thanks, that is along the lines I was thinking. I just wanted to make sure I was not missing something.
- bujones
- Posts: 14
- Joined: Wed Jun 03, 2015 9:32 am
Re: RGB Matrix Hat for PI and buttons
Project is going well. I had an Arduino Pro Mini which opened up more possibilities for the project. I attached a 2x16 LCD display to the arduino and have a nice menu for the different functions of the timer/clock. It communicates well with the Pi and I can control everything I want. So now I want to put it all together. Could I use a 5v 10A PS to power all the devices? Can I create a power buss and distribute the power to each device to make a single power connection to the Pi, Arduino, and the Hat?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: RGB Matrix Hat for PI and buttons
Yes, 10A should be enough for everything.
Please be positive and constructive with your questions and comments.