??? 01/15/13 16:14 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#189174 - Design your project in the first place Responding to: ???'s previous message |
Erik Malund said:
If the "code" you've provided is not your own work, then you should thoroughly understand it before asking us to decipher it for you.
oddly enough, when you comment it, you may find the fix yourself, if not, it enables us to help you. I agree 100% with Erik. However, even with comments, it is rather long and prone to errors. I have made NO attempt to read it, but I can guess that you are showing 'patterns' of lights. The N'th pattern will display for T milliseconds, and then a new pattern, and so on ... So if you 'design' for a lookup table that contains 'pattern' and 'display time', you will have something easy to manage. Then you just need a function to read the N'th pattern and time from the table. And a timing function to reflect the 'display time' T. Of course, you can always take a different approach. Whichever way you go, you need to explain your 'design'. And describe your support functions. David. |