Adafruit 8x8 small matrix

Talk about Adafruit Raspberry Pi® accessories!

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Adafruit 8x8 small matrix

Postby holaparc » Thu Nov 08, 2012 1:20 pm

I purchased a raspberry pi kit along with a Adafruit 8x8 small matrix with backpack. I started playing with it and everything is perfect. the only problem I am encountering is with matrix or the backpack. each time I start by editing the code and saving it and then run the command. everything works perfect until more or less 30 minutes has passed. after 30 minutes the pi becomes real slow, it starts freezing and the matrix just starts running every code i have ran all at once. i tried clearing the matrix with the grid.clear() and it does't work. removed power to backpack and once i put it back in it keeps doing the same. when i shut down pi with the shut down command the pi turns off , the matrix stops trying to run all the codes at once and LEDS stay "on" showing the beginning of the last successful code that was ran before it went bananas. Then disconnect the pi from power adapter( supplied in kit) and reconnected, then the whole process starts again.. running adafruit's OS.
if anyone can help me , i will appreciate it.
if there is a command that can be use to clear the backpacks memory at the end of each code maybe it will help. or anything to clear the contents of it or in the pi, i really don't know I am not an expert.

thank you .
holaparc
 
Posts: 20
Joined: Fri Oct 19, 2012 10:21 am

Re: Adafruit 8x8 small matrix

Postby adafruit » Sat Nov 10, 2012 9:20 pm

try powering the backpack from +5V instead of the +3V
User avatar
adafruit
 
Posts: 10485
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Adafruit 8x8 small matrix

Postby holaparc » Sun Nov 11, 2012 1:24 pm

adafruit wrote:try powering the backpack from +5V instead of the +3V


Thanks. It did not help. :(
holaparc
 
Posts: 20
Joined: Fri Oct 19, 2012 10:21 am

Re: Adafruit 8x8 small matrix

Postby tldr » Sun Nov 11, 2012 10:09 pm

sounds like something in your code is modifying the length of a delay, making it very short so that your program is hogging all the cpu cycles.

the matrix backpack itself has no memory, except for what's currently displayed.

maybe if you would share your code...
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 337
Joined: Thu Aug 30, 2012 12:34 am

Re: Adafruit 8x8 small matrix

Postby holaparc » Tue Nov 13, 2012 5:45 pm

#!/usr/bin/python

import time
import datetime
from Adafruit_8x8 import EightByEight

# ===========================================================================
# 8x8 Pixel Example
# ===========================================================================
grid = EightByEight(address=0x70)

print "Press CTRL+Z to exit"

a = [0xFF,0xC,0xE1,0x60]

i = 0
while(True):


if i == 0:
grid.writeRowRaw(7,a[0])
grid.writeRowRaw(6,a[0])
grid.writeRowRaw(5,a[1])
grid.writeRowRaw(4,a[1])
grid.writeRowRaw(3,a[1])
grid.writeRowRaw(2,a[1])
grid.writeRowRaw(1,a[0])
grid.writeRowRaw(0,a[0])
time.sleep(0.5)
grid.clear()
i+=1

if i == 1:
grid.writeRowRaw(7,a[0])
grid.writeRowRaw(6,a[0])
grid.writeRowRaw(5,a[2])
grid.writeRowRaw(4,a[2])
grid.writeRowRaw(3,a[2])
grid.writeRowRaw(2,a[2])
grid.writeRowRaw(1,a[0])
grid.writeRowRaw(0,a[0])
time.sleep(0.5)
grid.clear()
i+=1

if i == 2:
grid.writeRowRaw(7,a[0])
grid.writeRowRaw(6,a[0])
grid.writeRowRaw(5,a[3])
grid.writeRowRaw(4,a[3])
grid.writeRowRaw(3,a[3])
grid.writeRowRaw(2,a[3])
grid.writeRowRaw(1,a[3])
grid.writeRowRaw(0,a[3])
time.sleep(0.5)
grid.clear()
i+=1

Its nothing fancy since I am new to programming. I just dont know why would it make my pi freezze.unless its the os by adafruit that has a bug? i really dont know.
holaparc
 
Posts: 20
Joined: Fri Oct 19, 2012 10:21 am

Re: Adafruit 8x8 small matrix

Postby tldr » Wed Nov 14, 2012 9:07 am

first off, with python it is especially important to use code tags, since indentation is syntactically relevent...

is this the entire program? if so once i gets to be equal to 3, you'll be running a very tight loop doing nothing. this would make the pi appear frozen, though it will really be pretty much chasing its own tail.

Code: Select all
#!/usr/bin/python

import time
import datetime
from Adafruit_8x8 import EightByEight

# ===========================================================================
# 8x8 Pixel Example
# ===========================================================================
grid = EightByEight(address=0x70)

print "Press CTRL+Z to exit"

a = [0xFF,0xC,0xE1,0x60]

i = 0
while(True):

   
    if i == 0:
         grid.writeRowRaw(7,a[0])
        grid.writeRowRaw(6,a[0])
        grid.writeRowRaw(5,a[1])
        grid.writeRowRaw(4,a[1])
        grid.writeRowRaw(3,a[1])
        grid.writeRowRaw(2,a[1])
        grid.writeRowRaw(1,a[0])
        grid.writeRowRaw(0,a[0])
         time.sleep(0.5)
   grid.clear()
        i+=1
       
    if i == 1:
         grid.writeRowRaw(7,a[0])
        grid.writeRowRaw(6,a[0])
        grid.writeRowRaw(5,a[2])
        grid.writeRowRaw(4,a[2])
        grid.writeRowRaw(3,a[2])
        grid.writeRowRaw(2,a[2])
        grid.writeRowRaw(1,a[0])
        grid.writeRowRaw(0,a[0])
         time.sleep(0.5)
   grid.clear()
        i+=1
       
    if i == 2:
         grid.writeRowRaw(7,a[0])
        grid.writeRowRaw(6,a[0])
        grid.writeRowRaw(5,a[3])
        grid.writeRowRaw(4,a[3])
        grid.writeRowRaw(3,a[3])
        grid.writeRowRaw(2,a[3])
        grid.writeRowRaw(1,a[3])
        grid.writeRowRaw(0,a[3])
         time.sleep(0.5)
   grid.clear()
        i+=1
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 337
Joined: Thu Aug 30, 2012 12:34 am

Re: Adafruit 8x8 small matrix

Postby holaparc » Sun Nov 25, 2012 7:18 pm

I still have the same problem. I had the indentations correct just that I paste it as text not as code. Please check the video. Like I said the pi works flawlessly for around 30 minutes. It does not appear to be frozen;it freezes because processor usages stays stuck at 100 for 5+ minutes, terminal takes for ever to type a letter or to show previous command when I press up. Then it just gives up and runs a crazy code like the video( its different every time).I shut down. And led grid stays on with the LEDs that were flashing at the moment it turned off .LEDs will not go off until power is unplug from pi.http://www.youtube.com/watch?v=GTDVtsxCW6I&
holaparc
 
Posts: 20
Joined: Fri Oct 19, 2012 10:21 am

Update!!!

Postby holaparc » Mon Dec 03, 2012 11:27 am

Update: Today I decided to test my pi with serial connection.installed drivers and checked my chip version and i figured the port (com4)"chip xxx..) . The led matrix worked wonderful, at about 20 minutes i stopped running commands in terminal (putty) and started practicing how to make files in terminal(I'm a noob). it stayed on for at least 10 more minutes. Putty "froze" (it didn't want to respond and then it said connection lost). I used the check chip version after this happened, and com4 now said "Open com port failed". I checked each port and My chip was not listed anymore.
I have come to the conclusion , that the problem is that my pi losses connection after more or less 30 minutes and the only way to gain connection again is when i restart it. I was using the Ethernet cable at first, now im using serial.
PLease help me. Thank you
holaparc
 
Posts: 20
Joined: Fri Oct 19, 2012 10:21 am

Re: Adafruit 8x8 small matrix

Postby adafruit » Mon Dec 03, 2012 9:08 pm

try a different serial terminal, it sounds like its a problem with putty?
User avatar
adafruit
 
Posts: 10485
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Adafruit 8x8 small matrix

Postby holaparc » Tue Dec 04, 2012 11:25 am

I will but if it was a problem with putty wouldn't the " program that checks the chip model" would still show the chip model under the correct com port?. Like I turned the pi on, checked the port and it said com4 I left it on for 30 minutes (did not open putty at all) , the pi was still on but the chip was not showing in any of the comx ports . Thank you for your help.
holaparc
 
Posts: 20
Joined: Fri Oct 19, 2012 10:21 am

Re: Adafruit 8x8 small matrix

Postby adafruit » Thu Dec 06, 2012 10:51 am

not sure, maybe check with the raspberry pi forums? we dont understand exactly whats going on with your Pi but we dont think its damaged.
User avatar
adafruit
 
Posts: 10485
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Adafruit 8x8 small matrix

Postby holaparc » Fri Dec 07, 2012 2:39 pm

Update:Thank you. I think it might be an issue with your distro(Linux) or code I'm not sure. I loaded a fresh image of your distro but this time I connected through the webIDE. And the problem happens like this. run code from webIDE, .... works flawlessly. For 2 hours +. Closed terminal.. led matrix goes bananas.
Run code ex_matrix_8x8.py once... close terminal . Goes bananas.
If I don't run any code that has to do with the matrix and then close terminal .no problems nothing happens .

I know this is not a Linux (code) board but thanks for helping me trying to figure out what the real problem was.
holaparc
 
Posts: 20
Joined: Fri Oct 19, 2012 10:21 am


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: Totalslaughter and 4 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]