[SOLVED] MD freezes when initializing buttons
Posted: Wed 24. Sep 2014, 19:50
I checked out the latest V2 code for the multidisplay SVN project and (after adjusting the defines) built & flashed it to my MD (which I just finished assembling). But when I start the MD it freezes during button initialization. To be more specific it freezes when running the line in function void MultidisplayController::expanderWrite(byte _data) at line 541 in MultidisplayController.cpp, which is called from in function void MultidisplayController::myconstructor() at line 256 in MultidisplayController.cpp.
At first I thought that the wire.endTransmission() was the problem, but then I noticed that function expanderWrite2 is called at line 240, and that went just fine. Or are expanderWrite and expanderWrite2 communicating with different IC's?
As far as I understand, the expanderWrite function is communicating with MD02 IC6?
But then how come MD02 is involved in initializing the buttons at all? Shouldn't the buttons be connected to MD01 K5 that is connected directly to IO pins on the Arduino?
Feels like I've misunderstood something...
EDIT:
I just performed a search in Eclipse, and line 256 seems to be the only line calling the function expanderWrite. And the only line I can find calling for expanderRead is
Does this mean that the button initialization in line 256 is only needed for V1 and not for V2?
Code: Select all
wire.endTransmission();
Code: Select all
expanderWrite(0b10000011);
At first I thought that the wire.endTransmission() was the problem, but then I noticed that function expanderWrite2 is called at line 240, and that went just fine. Or are expanderWrite and expanderWrite2 communicating with different IC's?
As far as I understand, the expanderWrite function is communicating with MD02 IC6?
But then how come MD02 is involved in initializing the buttons at all? Shouldn't the buttons be connected to MD01 K5 that is connected directly to IO pins on the Arduino?
Feels like I've misunderstood something...
EDIT:
I just performed a search in Eclipse, and line 256 seems to be the only line calling the function expanderWrite. And the only line I can find calling for expanderRead is
Code: Select all
buttonCheck_V1(expanderRead());