Labels

Friday, 26 April 2013

MDDN 251: Faster Light Patterns and understanding of the Code


I understand the code that has been applied to create these patterns and lights. There is a simple number change to change the speed of the lights. By changing the DELAY of the lights, it can be made to go faster (when there is a low delay of 100 or less) or slower (when there is a delay of around 300, that is the speed of the previous video posted). To control these speeds, a simple IF statement is needed that states IF the number recorded on the serial monitor increases by 100, the delay will decrease by 25. So if the slowest delay speed was 300, by the time the serial monitor reaches 1023 (typical peak digital recorded number) the delay will be 50-25, which means the lights will be shining as fast as they are shown in the above video.

No comments:

Post a Comment