Ok, so I have been using my Duemilanove from adafruit for about 2 weeks, all was working properly. I built a 3x3x3 cube and wrote a small sketch to run that, it works as expected for a little while (timeframe changes) and then stops running the sketch, led 13 on board starts blinking wildly and if I try to reset (via button) it does nothing, if I try to upload to it again, I get an AVR programmer not responding error.
After I unplug the USB cable and plug it back it, all works as expected, again for a little while, and then repeat above.
I can send my code, but it would not let me upload the .pde file.
Sketch stops and AVR not responding.
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Sketch stops and AVR not responding.
probably some power issues. you may be overdriving the chip, shorting something, etc
- Mixer
- Posts: 12
- Joined: Wed Dec 23, 2009 10:39 pm
Re: Sketch stops and AVR not responding.
ok well, I am a noob, and I am trying to self learn, so I am sure that there is a BUNCH of stuff I don't know. So lets go with my assumptions first. I would assume that if I had a short it would either be intermittent or be shorted from the start, I have visually checked for shorts and do not see any at this time. It is important to note that this anomaly only shows up after 4 iterations of my loop code, it does this every time.
I would think that would lead more to a code issue, is it possible to "overdrive" the chip with code? I have attached my code for review as well. I'm sure that my code is ugly, but lets try and focus on bugs in the code that might cause this problem, and not on my style of writing code. Thank you in advance.
I would think that would lead more to a code issue, is it possible to "overdrive" the chip with code? I have attached my code for review as well. I'm sure that my code is ugly, but lets try and focus on bugs in the code that might cause this problem, and not on my style of writing code. Thank you in advance.
- Attachments
-
- ledcube.txt
- (3.08 KiB) Downloaded 348 times
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Sketch stops and AVR not responding.
well what happens when you upload the blink sketch?
- Mixer
- Posts: 12
- Joined: Wed Dec 23, 2009 10:39 pm
Re: Sketch stops and AVR not responding.
well it appears that it is a software to hardware related thing. If I comment out the bottom section that has the clearCube() functions with the delays and the allOn() function, then it will run correctly for a much longer time, and then it fails in a different way.
The first time it failed it just stopped all together, now when it fails just a single LED will continuously blink, but unlike the first time, if I push the reset, it resets and starts over.
So I am going to play with the delays and such and see if that alleviates the issue, im thinking maybe that it takes the LED a much longer time to come on and go off than it does the chip to send the next signal and maybe it is too fast.
Oh BTW the blink script seemed to work as expected, and along with the other findings I don't necessarily think it is a hardware issue per se' .
The first time it failed it just stopped all together, now when it fails just a single LED will continuously blink, but unlike the first time, if I push the reset, it resets and starts over.
So I am going to play with the delays and such and see if that alleviates the issue, im thinking maybe that it takes the LED a much longer time to come on and go off than it does the chip to send the next signal and maybe it is too fast.
Oh BTW the blink script seemed to work as expected, and along with the other findings I don't necessarily think it is a hardware issue per se' .
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Sketch stops and AVR not responding.
sounds like your arduino is fine.
-
- Posts: 1645
- Joined: Sat Nov 10, 2007 12:59 am
Re: Sketch stops and AVR not responding.
i would guess that allOn is killing the sketch, but you don't say how you wired your cube. looks like maybe you copied the one that was in the make: weekend project a long, long time ago. each layer with the cathodes wired in common? do you have current limiting resistors on the colPins? what value? to run a cube built in this manner you need to use a technique called multiplexing. light one level at a time and bring the cathode for that level low, leaving the others high, then repeat for the other two levels. allOn definitely isn't working like that.Mixer wrote:well it appears that it is a software to hardware related thing. If I comment out the bottom section that has the clearCube() functions with the delays and the allOn() function, then it will run correctly for a much longer time, and then it fails in a different way.
Please be positive and constructive with your questions and comments.