WorksheetsProgramming Concepts
Total questions: 20
Worksheet time: 10mins
Multi-Line Comment
Indicated by /* */ in the code.
Indicated by // in the code.
Indicated by # in the code.
Indicated by in the code.
Increment in For Loop
Executed each time through the loop when the condition is true, modifying the loop control variable.
Executed only once before the loop starts.
Executed only if the loop condition is false.
Executed at the end of the loop iteration.
void loop()
Contains code that repeats until the sketch ends with a command or the Reset button.
Is used to define a function that runs only once.
Is a function that initializes variables before the main program runs.
Is a command that stops the execution of the program.
prizm.setServoPosition( );
Sets angle of servo motor
Controls the speed of the motor
Turns the motor on and off
Adjusts the brightness of an LED
Initialization in For Loop
Occurs first and only once.
Occurs every iteration of the loop.
Occurs at the end of the loop.
Is optional and can be skipped.
delay();
Represents the number of milliseconds to pause the program.
Sets a timer for a specific event.
Increases the speed of program execution.
Halts the program indefinitely.
Single Line Comment
Indicated by // in the code.
Indicated by /* */ in the code.
Indicated by # in the code.
Indicated by -- in the code.
Verify/Compile
Checks code for errors.
Runs the code without checking for errors.
Optimizes the code for performance.
Converts code into a different programming language.
Servo
Turns 90 degrees
Turns 180 degrees
Turns 360 degrees
Does not turn
For Loop
A control flow statement that allows the repeated execution of a block of code for a specific number of times.
A type of loop that continues indefinitely until a specific condition is met.
A statement that executes a block of code only once.
A method for defining functions in programming.
Motor
Turns 180 degrees
Turns 360 degrees
Turns 90 degrees
Turns 270 degrees
prizm.readSonicSensorIN();
Sets up Sensor to read inches
Initializes the sensor for temperature measurement
Configures the sensor to read centimeters
Activates the sensor for sound detection
Ultrasonic Sensor
The information gathered communicates distance.
It measures temperature variations.
It detects light intensity.
It calculates humidity levels.
prizm.setRedLED(LOW)
Turns red Prizm LED off
Turns red Prizm LED on
Flashes red Prizm LED
Disables red Prizm LED
If Statement
A control structure that repeats a block of code multiple times.
Checks a condition and executes statements if the condition is true.
A method for defining variables in programming.
A way to handle errors in a program.
Arduino Integrated Development Environment (IDE)
Open-source software that compiles code and uploads it to the hardware.
A proprietary software for programming microcontrollers.
A hardware component used for circuit design.
A cloud-based platform for IoT applications.
Condition in For Loop
Tested each time through the loop; if true, the loop continues; otherwise, it ends.
Executed only once regardless of the condition.
Runs indefinitely without checking any condition.
Only checks the condition at the beginning of the loop.
prizm.PrizmBegin();
Initializes the PRIZM controller.
Starts the PRIZM interface.
Configures the PRIZM settings.
Resets the PRIZM system.
While Loop
Checks a test condition inside parentheses to see if it remains true, and loops continuously until the condition becomes false.
Executes a block of code a specific number of times regardless of a condition.
Loops through a collection of items until all items have been processed.
Checks a condition before executing the loop for the first time.
prizm.setRedLED(HIGH)
Turns red Prizm LED on
Turns green Prizm LED off
Flashes the Prizm LED
Turns off all Prizm LEDs
