Go Down

Topic: Beginning Arduino project 19 issues(solved) (Read 2241 times) previous topic - next topic

jolphil

Sep 26, 2012, 04:15 pm Last Edit: Oct 05, 2012, 09:00 pm by jolphil Reason: 1
Hello Again,
Has anyone completed the above project recently?.The reason I ask is I have spent at least two weeks on this single project.I wonder after downloading and installing the timerone library and renaming it as suggested in a previous post,should the library be finally named "ISRBlink"..Before renaming the lib, the compiler complained and after the rename it seemed OK..But is that the correct library for this sketch?..In my case I get nothing like the results that should be displayed..What I get is that all LED's in the matrix lighted and with some fast blinking of all LED's..
I will appreciate any help at all,
Thank you
jolphil
PS If you need any additional information,please let me know..

liudr

Don't know what project the "above project" is. I should say
Quote
PS If you need any additional information,please let me know..


You simply stole my line.

jolphil

Yes I was not very clear..I have a beginners book called "Beginning Arduino" by Michael  Mc Roberts..In the book he takes you through various projects starting with blinking a single LED and explains the code and how it works..He progresses from there little by little..
On project 19, the Arduino uno drives two 8 bit shift registers so as to display an 8x8 matrix LED display..The display is supposed to show an animated pattern on the matrix..In my case all the LED's lite and stay lit.As part of the procedure you are supposed to download a external library called timerone and install it into the Arduino IDE.
The link for Timerone was a google download called Timerone-V9.zip..It would not install without the IDE showing an error..In my previous post it was suggested that I rename the Timerone-V9 folder to just Timerone..That seemed to work and there was no more IDE error..This code was inserted without error because this time, I just copied and pasted it into the IDE..No errors in verifying and uploading it. BUT::: as stated the results are not what it should be..I was wondering if anyone else has a similar problem or is it more local (namely me)..
Regards,
jolphil

pylon

Can you take a photo of the wiring? Sounds a bit like a wiring problem to me but let us check first. And it may be also wise to post the full sketch your using, so we can check that too.

liudr


It would not install without the IDE showing an error..In my previous post it was suggested that I rename the Timerone-V9 folder to just Timerone.


You did the right thing. Maybe it is Java, arduino can't accept "-" in names so you either get rid of it or use underscore.

Quote
I was wondering if anyone else has a similar problem or is it more local (namely me)..
Regards,
jolphil


Update your forum info to include your location.

Before this project 19, were there any earlier project with shift registers. If yes, did they work?

jolphil

Sorry for the delay..I had a whole page of specific comments typed and then went to preview it and lost the
entire page..Grrrrrrrrrrr!
I'll get back as soon as I can.
jolphil

jolphil

Hi again,
Sorry for the delay..I have been checking and re checking everything and I still cannot find the problem..At
this point I am going to go back to the first shift register project and try to get a better understanding of the sketch..They worked before and at this point I think my problem is in the installation of the external library..In windows, the IDE does not actually install..It is an executable in my downloads folder..Thus some of the suggestions i have read and the book instructions results in various errors.. An example of one of the errors is "avrdude:stk500-get sync(); Not in sync:reap=0x00" I have no clue what that means...Each way I try to install the library gives different a different error.I have tried this pagehttp://arduino.cc/en/Guide/Libraries but that also gives an error when either verifying and or uploading..Looks like I need more basics..
I thank you all your your suggestions and comments and will be back again,
Thanks again,
jolphil

dxw00d

Quote
avrdude:stk500-get sync(); Not in sync:reap=0x00


That means that your PC can't connect to the Arduino. Do you have the correct Board/Port selected? Have you checked that the driver is installed correctly?

jolphil

Thank you dxd00d
I moved the port to com 7 from 1 and now I can upload  without error..BUT I still have some other problem as all the LEDs in the project Lite and flicker rather than show a selected display that changes every half second or so..
That brings up another question: when a library is needed in a sketch, do you have to import the library first or does the IDE do it automatically..
Thanks again,
jolphil

PaulS

Quote
when a library is needed in a sketch, do you have to import the library first or does the IDE do it automatically..

Yes, you do. No, it doesn't.

liudr


Sorry for the delay..I had a whole page of specific comments typed and then went to preview it and lost the
entire page..Grrrrrrrrrrr!
I'll get back as soon as I can.
jolphil

Tell me about it. I lost several long replies myself.

tylernt


Quote

Tell me about it. I lost several long replies myself.
I've gotten into the habit of hitting ctrl-a then ctrl-c before posting or previewing. Then if your post gets eaten, you just hit Paste and it all comes back.

liudr



Quote

Tell me about it. I lost several long replies myself.
I've gotten into the habit of hitting ctrl-a then ctrl-c before posting or previewing. Then if your post gets eaten, you just hit Paste and it all comes back.


I always do that on a pc. If I use ipad, I just thought it is too much work.

jolphil

Yippee!!!  It is solved..For any one else having problems heres what I did..
First let me explain that my matrix is different than the authors matrix..His was an 8x8 with the Rows as common cathodes..That means that to lite row 1 you would need positive voltage on the column 1(anode) and ground Row1 cathode..Mine was just the opposite..I needed positive voltage on Row 1 and ground Column 1..In my case I just rewired the Fritz drawing so the Rows were sent to the columns and the columns were sent to the rows..After all the matrix is dumb and as long as you feed the proper voltages at the appropriate time it knows no difference..
I hope that is clear.. Next the author published an error in his code
It was   row=row << 1; //bitshift left
             To
            row=row >>1; // bitshift right

After I made the change, it still did not work correctly..My matrix flashed all LED's and appeared to flicker every half second..
Now down to the void that deals with data
Was:
// if the value of DataOut and (logical AND) a bitmask
                // are true, set pinState to 1 (HIGH)
                if ( dataOut & (1<<i) ) {
                               pinState = HIGH;
                }
                else {
                        pinState = LOW;
                }

TO

// if the value of DataOut and (logical AND) a bitmask
                // are true, set pinState to 1 (HIGH)
                if ( dataOut & (1<<i) ) {
                               pinState = LOW;
                }
                else {
                        pinState = HIGH;
                }
In other words just reversed the data polarity from HIGH to LOW and LOW to HIGH
I guess I should really adjust the comments to suit but I am so happy I can hardly type...Hehe

I don't know if this is a result of my matrix or just another code  error..BTW the authors above bitshift correction above is essential..
This has been a three week battle but persistence pays off..GoodLuck!!
jolphil



jolphil

Moderator:
If you think this would be better in another place...Please feel free to do so..
jolphil

Go Up