Well, I feel much better today - I was able to rule out my wiring, chips, and 8x8 display as the problem. I was reading ahead into Project 20 that uses the same wiring setup as Project 19. I took a chance and loaded the Project 20 program and - BAM - it works! (See first video below.)
Next, I copied a fresh version of the Project 19 code from the zip file containing all the book's programs (just in case I'd accidentally modified the code or something)... after loading it, I got the same error - a single flashing row along the top of the 8x8 display (see second video).
means that the program for Project 19 definitely has an error... but I've gone over and over it and cannot find the mistake. Maybe a reader can spot it?
Either way... I'm happy that Project 20 is working and it's a fun little exercise to go over. I've always wondered about "sprites" and "multiplexing" when it comes to game design (I've heard the terms often) and I think my understanding just increased a good bit.
BTW - Project 19 text describes the program as displaying a heart and then inverting it (page 132, 3rd paragraph under "Enter the Code") - but if you look at the actual program, the sprite stored is just a box in a box... the ones represent solid lines so you'll see there's an outer box made up of the outer LEDs and then a smaller inner box. Not sure if this is a major error in the book and means that the actual working program for Project 19 wasn't included (heart) but this box-in-a-box program was inserted in its place.
Tuesday, March 8, 2011
Subscribe to:
Post Comments (Atom)
Hi i am confused on the code works. To simplify the code i block out the animation part (// led[i][j] =
ReplyDeleteled[i][j] << l | led[i]....) and only focused on the first frame (shiftIt (~led[0][K]])) which only puts out a still image. My question is how does this ~led[x] [x] = led [x][x]. The image that is being displayed is not being inverted by ~led.