Code one of the buttons on Code Car to act as a brake pedal, turning on the brake lights when the 'pedal' is pressed!
New Concept: Inputs vs. Outputs
Up to this point, after you hit "Upload" for your code, all you could do is observe what it does. With the addition of buttons to your program, you now have the ability to interact with your code and change what Code Car does after you've uploaded code. This is also the point when you could show your Code Car to someone else and they could interact with it without being involved with the coding process. In computer science terms, the button is an 'interface' to your program, so that a simple action (pressing it) makes something complicated happen in the background, and then an outcome occurs (the light turns on!).
It's useful to think of inputs as things that send information into a program. Then the program can do something with that information. The do something is often a process that leads to an output.
New Concept: Decision Making
This program is the first time that your Code Car has 'made a decision' about what to do. To put it a different way, each time the void loop of the program runs, two different things could happen: the brake light could be signaled to turn on or it could be signaled to turn off. Almost any time there is an input to a program, there is a 'decision' being made. Imagine logging off of your computer. You go and find the 'log out' button and click it. Somewhere in the computer code, there must be a 'decision' made by the code so that "if 'log off' is clicked, run the log off process."