Introduction to Arduino, circuits, and C family programming languages
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The first part of the assignment needs
Correctly wired traffic lights as outlined in the video
variables for each light
Setup pin modes for each light
Create a pattern as outlined in the video
Once it runs correctly, create a student defined function called normalTraffic to run the pattern.
The second part of the assignment needs
A second student defined function with flashing red lights
A third student defined function with one flashing red and one flashing yellow light
A fourth student defined function with the opposite flashing red and yellow lights
For the third part of the project, add a button that controls the 4 modes.
For the fourth part of the assignment, change the button to an interrupt and add text as described in the video.
**NOTE: We will not do servos until the end of the class, even though the concepts are clustered together in this video. You will only need to watch the first 8 minutes for a while.
For the three tasks, place your answers in separate functions. As you test them, please make sure you remove the ones you finished from void loop() :
OneServo()
Opposite()
Together()
So far, we have learned:
To use digitalWrite to turn LEDs on and off
To use analogWrite to change the amount of power to LEDs (and hence, the brightness)
Use digitalRead to find if a button has been pushed.
Use analogRead to find how much a potentiometer has been turned.
Use Servo.write to move a servo motor.
To create your own functions if they are going to be called repeatedly to save on code space.
To create sound using a piezo buzzer.
To research and implement components on your own.
Use a serial monitor to share data with a user.
For the final arduino project, you are going to create something, either physical or on tinkercad, which uses at least 3 of these concepts. This will be a prototype for an invention. Think about how the invention would look in it's finished form beyond the circuit.
On Day 1, I want you to brainstorm at least 10 things you could invent / make / modify using the skills you have. Turn in your brainstorming list to me for final approval.
Over the last several classes, you will design and program the main function of the circuit. On the final day, you will turn in three things to me:
A working circut and program, either on a breadboard or via Tinkercad.
A paragraph describing your invention's use.
A drawing or 3D model of the final invention beyond the circuit.