Let the void loop “decide” which of Code Car’s LEDs to flash on and off every time it runs. We’re using functions inside functions in this project.
New Concept: Random
The computer ‘makes a choice’ in this program about which tones it plays. Using this function can make your code do some things that are unpredictable, even to you, the programmer!
This program shows you a new way that you can replace numbers in a program with other functions. In past projects, you’ve replaced number values with variables, but those variables were stable values. Now you see how you can use functions or equations in place of a single number (assuming you get your syntax right!).