06 Quickstart

Problem

Your mission is to design a timer, with a loud alarm, and then send it wherever you need to keep track of time.



Design: Amplifier

Use craft supplies around the house to design an amplifier for your buzzer. 

Design: The Program

Write down what you'd like your robot to do when the timer rings. 



Build

Plug the buzzer into an AD port.

Attach the buzzer to your GoPiGo and then attach your homemade amplifier, too.



Code: Create a Variable

Use Advanced Bloxter to create a variable, set it to 10, and name it 'end'.

Then use a loop to [change the variable by 1] 20 times. 

Check your work using a [Print] command.


Code: Timer

Use the Timer commands to start your timer and then use a conditional function to start your robot behavior when the timer value is greater than 10.




Test

Set your 'end' variable to a few different values and watch what happens. 

How accurate is the timer?

Does the robot do what you planned when the alarm sounds?




Iterate

Consider improving your amplifier or tweaking your program to be more accurate. You might also improve how your robot alerts you to the end of the timer.


Last modified: Monday, 28 November 2022, 10:28 AM