Robotics 4TH Quarter
Robotics 4TH Quarter
=======================================
Lesson 11: Applying Sensors and Servo
Motors Sound Block
Move Block - plays a sound file or a single tone using the
- used to program your robot to go forward, NXT’s speaker
turn left, turn right, or move backward - accomplished by importing sound files to the
- also modifies speed controller
- you can configure the Port, Direction, Steering, - you can modify the sound, volume, and control
Power, Duration, and Next Action in the the sound look in the Configuration Panel
Configuration Panel
=======================================
Wait (Touch) Block NXT Line Follower
- reacts when the push button of the touch sensor There are two programs provided for the Line
is pressed, released, or bumped Follower. Both programs use the Color Sensor in
- it sends a message to the NXT Controller and the "Light Sensor" mode, where the sensor shines
executes the code given an LED lamp of one color (red is used here) and
measures the amount of light that is reflected back
======================================= into the sensor, as a number from 0 to 100
Touch Sensor
- stimulates feeling 1. The LineFollow program
- basic push button device - a simple "Two State" line following
- three states: strategy without any sensor
- pressed calibration.
- released - will repeatedly turn either left or right
- bumped (press + release) in a "zig-zag" pattern, alternating
- common uses: back and forth on either side of the
- wall detection right edge of the line.
- user input - To use this program:
- technic cross-axle hole built in 1. Determine a good brightness
value to use as the "cut-off"
Servo Motor between the two states (light
- allows the robot to be mobile and dark). To do this, you
- rotation sensor can use the LightMeter
- flexible configurations program to measure the
- two-way rotation brightness over the center of
- speed/power the line (darkest), then over
- time the open floor (brightest),
- rotation then average them to find the
- degrees cut-off. For example, if the
Light Meter reads 20 over the
line and 40 over the floor,
then 30 would be a good
cut-off value.
ROBOTICS REVIEWER 4TH QUARTER
2. The SmoothFollow program
- a much more complex "Proportional
Line Follower" which continually
adjusts the steering response of the
robot depending on how far off the
line the robot appears to be.
- If the robot is only slightly off of the
edge of the line, then only a small
amount of steering is applied.
- When the robot is exactly over the
right edge of the line, the robot will
drive straight ahead at the full power
specified. This allows the driving to Customized Block
be smoother and faster than the - a user-defined programming block that
LineFollow program. groups certain functions of blocks to keep
the Work Area organized.
======================================= - To create a custom block, highlight the
The Walker: Rovee blocks you want to group, then go to the
My Block Edit menu, and select Make A New My
- is a group of blocks combined so you can Block.
work with it as though it were a single block.
- allows the user to easily re-use a series of Custom palette
block sequences without the need of - Shows custom blocks
creating them again.
Initialization
- At the beginning of the program, the motors
enter reset mode using the Reset block.
The Reset block is used to trigger the
automatic error correction, then execute a
custom programming block called “Wait for
Enter key”.
ROBOTICS REVIEWER 4TH QUARTER
Additional Info:
Goodluck everyone!!!
- Q3: ඞ
-Q4: (ᐢ..ᐢ)