Robotics Programming Exam Review: Sensors and Commands, Exams of Programming Languages

A review of computer programming concepts related to robotics, focusing on sensor integration and control. It covers commands for bump switches, sonar, optical shaft encoders, and light sensors, along with explanations of debugging, compiling, and downloading programs. Key concepts include servo motors, conditional statements, pseudocode, and different types of sensors. This review is designed to help students understand the basics of programming robots and controlling their interactions with the environment. It serves as a study aid for understanding fundamental programming concepts in robotics. Questions and answers related to programming commands and sensor usage, making it a useful resource for exam preparation and reinforcing key concepts in robotics programming.

Typology: Exams

2024/2025

Available from 07/19/2025

mivon-brook
mivon-brook 🇺🇸

3.9K documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computer Programming Review Exam
Questions Answered Step By Step
Command a bump switch with natural language - ANSWER untilbump(dgtl_,
delaytime);
or
untiltouch(dgtl_);
Command a sonar with natural language - ANSWER
untilSonarLessThan(distance, dgtl_);
or
untilSonarGreaterThan(distance, dgtl_);
Command a sonar in a while or if loop (input 2 & 3) - ANSWER
(SensorValue[dgtl2]==___ )
(SensorValue[dgtl2]<___ )
(SensorValue[dgtl2]>___ )
Command an optical shaft encoder with natural language - ANSWER
untilRotations(rotations, dgtl_);
Command an optical shaft encoder in a while or if loop (input 4 & 5) - ANSWER
(SensorValue[dgtl4]==___ )
(SensorValue[dgtl4]<___ )
(SensorValue[dgtl4]>___ )
pf3

Partial preview of the text

Download Robotics Programming Exam Review: Sensors and Commands and more Exams Programming Languages in PDF only on Docsity!

Computer Programming Review Exam

Questions Answered Step By Step

Command a bump switch with natural language - ANSWER untilbump(dgtl_,delaytime); or untiltouch(dgtl_); Command a sonar with natural language - ANSWERuntilSonarLessThan(distance, dgtl_); or untilSonarGreaterThan(distance, dgtl_); Command a sonar in a while or if loop (input 2 & 3) - ANSWER(SensorValue[dgtl2]==___ ) (SensorValue[dgtl2]<___ ) (SensorValue[dgtl2]>___ ) Command an optical shaft encoder with natural language - ANSWERuntilRotations(rotations, dgtl_);

Command an optical shaft encoder in a while or if loop (input 4 & 5) - ANSWER(SensorValue[dgtl4]==___ ) (SensorValue[dgtl4]<___ ) (SensorValue[dgtl4]>___ )

Command light sensor with natural language - ANSWER untilLight(threshold,in_); untilDark(threshold, in_); Command light sensor in a while or if loop - ANSWER (SensorValue[in1]>400 ) (SensorValue[in1]<400 ) Debugger window - ANSWER allows a programmer to see sensors/motors realtime functionality

Compile program - ANSWER checks code for errors Download program - ANSWER sends code to cortex Motor and Sensor Setup - ANSWER it is a central place to configure and nameall the inputs that are connected to the Cortex

Servo Motor - ANSWER motor that rotates 0-180 degrees 269/393 Motor - ANSWER motors that rotate continuously while(1==1) { } - ANSWER run code forever