Program a button that will turn a light on. Then pressing it again will turn the light off.
Skills:
Save the LED state (on/off) as a variable.
Check state of a variable to perform a function.
Create a event listener (button press trigger)
Using buttons or events to trigger functions is a fundamental programming skill. Storing, reading, and changing information in variables will vastly expand the complexity of your programs. Once your button is working, you can experiment with triggering other events or Arduino components.
Use motors in TinkerCad Sim Lab
Skills:
3D Design
Motors in TinkerCAD Sim Lab
Motion and physics
Watch this video to learn how different types of motors in TinkerCad Sim Labs. Try creating a complex Zombie Diversion Unit with multiple moving parts.
Combine an ultrasonic sensor with a servo to sweep the landscape for threats.
Skills:
Design housing for components (designs could be made of cardboard or made in TinkerCad and 3D printed)
Code a servo to sweep at set intervals
Code an ultrasonic sensor
use programming loops
For this project, combine your knowledge from Day 6 (Ultrasonic) and Day 7 (Servo) to create a program that will rotate the ultrasonic sensor to scan more of the area surrounding the bunker.
Tip: rather than the servo continuously moving, try:
rotating the servo to 0 degrees, stop and allow time for scanning
rotate the servo to 90 degrees, stop and allow time for scanning
Rotate the servo to 180 degrees, stop and allow time for scanning
Use loops and functions
You can reuse much of your code from Days 6 and 7.