Flashing LED game.

roho

Member
My first PicAxe project, and the completion of something that has been part built and busy gathering dust at the back of a cupboard for more than a decade. It's not very useful in itself, basically just mild entertainment, but it's enabled me to get to grips with PicAxe on something that's relatively straightforward, in preparation for more serious stuff ahead. The game is very simple -- there are 5 different coloured LEDs with matching buttons. The LEDs flash in a pseudo-random sequence that gets progressively more difficult to follow, and you have to press the buttons in the same sequence. Getting it right advances your score and getting it wrong or getting too far behind ends the game. This game may well have an official name, but I don't know it.

Attached are the hardware design and coding for the PicAxe. I chose to do the switch de-bouncing in HW because it is simple and reliable and also because I was uncertain of the SW latency. On the SW side, I get the impression that I could have put the values for LedSeries and InjectorSeries in as table data, though what is actually possible is not clear to me at the moment. If anyone could clarify this then I'd be grateful.

View attachment Spede.DSN
View attachment Spede.bas
 

roho

Member
"Relatively straightforward". Hmmm, well I released the original design after doing a fair bit of testing, but, it turns out, not enough. After a while it became apparent that, good fun though it was, the game wasn't behaving as intended. The culprit was the way I handled the effect of the interrupt in the SW, causing delays to be truncated. This appears to have been successfully corrected in the latest coding, and I took the opportunity to make some other improvements and also to put some comments in the code. Hopefully, the code is now easier to understand for anyone that is interested in reading it.

View attachment Spede.bas
 

techElder

Well-known member
You have created a version of what is called "Simon".

Simon is an electronic game of memory skill.

The device has four colored buttons, each producing a particular tone when it is pressed or activated by the device. A round in the game consists of the device lighting up one or more buttons in a random order, after which the player must reproduce that order by pressing the buttons. As the game progresses, the number of buttons to be pressed increases.
 

roho

Member
You have created a version of what is called "Simon".
Ah yes, of course, now I've seen it, I remember it. Back in production as well, after all these years. The version I based my design on was used in a Finnish TV programme, "Speden Spelit", which was broadcast during the late '90s and early '00s. Thanks Tex.
 
Top