0% found this document useful (0 votes)
21 views4 pages

Path Tracing Robot

Uploaded by

22m146
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

Path Tracing Robot

Uploaded by

22m146
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

PATH TRACING ROBOT

Step 1:

The Lego Mindstorms NXT icon on the desktop is double clicked. The window opens where
there are common icons to its left, followed by the space for programming to its right ,is a
pane which provides necessary steps for building as well as programming the robot.

Step 2:

The loop icon is first placed in the loop by clicking on the icon, dragging and then placing it
on the loop already provided. The control option of the loop is provided as forever from the
drop down list box .

Step 3:

Next , the switch icon is clicked , dragged and placed inside the loop previously created
.This block is used to choose between two sequences of code. For example, when configured
with a touch sensor, the switch block might run one series of blocks when the sensor is
pressed and another when it is not.

Step 3:

1. Further in the pane which is beneath the programming pane that displays the various
selections for the switch block as in fig 1, select the control as sensor from the drop
down list box and select the sensor as light sensor in the sensor selection option from
the list of sensors .

2. Choose the port where your light sensor is plugged in. By default, the block will be
set to port 3 for a light sensor. You can change this selection if you need to.

3. Use the slider to set the trigger value or type a value directly into the input box. This
requires caliberation of the light sensor on the NXT brick to find the amount of light
reflected from the path.Then set the slider value to the caliberated value.

4. If you check the “Generated Light” checkbox, the light sensor will turn on its own
small light source and detect this light if it is reflected back to it.
Fig 1. Configuring the switch block with light sensor

Step 4:

The move icon is now first placed on the upper arm of the switch block (i.e the condition
when desired reflectance is sensed ) ,by clicking on the icon , dragging and then placing it on
the required position .In the pane beneath the programming pane

1. Select one of the motors you would like to control. (Example: If B and C are the
ports connected to the motors ,select one of them, say B ), the motor will be
synchronized, moving at exactly the power provided by the user.

2. Choose whether the motor will go forward, go backwards.

3. Using the Duration pull-down menu, you can set the motors to run for an unlimited
interval or for a set number of seconds, rotations [default] or degrees. By choosing
Time, Rotation or Degrees you can control how far your robot will travel. Here
unlimited interval is chosen for the desired operation.

Step 5:

Next , another move icon is placed next to the previous move icon.Beneath the programming
pane,select the port to which the other motor is connected (example since B is selected
previously,now select the other motor connected to C).The direction is chosen as brake here.
Step 6:

Now a move icon is dragged and placed on the lower arm of the switch block (i.e the
condition when desired reflectance is not sensed). Here the motor other than the motor
selected in the previous arm move icon is selected(here C)and the desired movement forward
or backward is chosen. Using the Duration pull-down menu, you can set the motors to run for
an unlimited interval or for a set number of seconds, rotations [default] or degrees. Here
unlimited interval is chosen for the desired operation.

Step 7:

Next , another move icon is placed next to the previous move icon . Beneath the
programming pane, select the port to which the other motor is connected (example since C is
selected previously, now select the other port B).The direction is chosen as brake here .The
program is complete and will resemble the fig below.

Fig .2 Final program


Step 8:

After all the above operations, the robot is connected to the PC using the USB cable. The
downward pointing button among the five icons placed in the bottom of the window is
clicked as in fig 3and the robot is now programmed and ready to perform the programmed
task.

Fig.3Downloading the program to robot brick

Step 9:

The robot is now disconnected from the PC and then the downloaded file is selected in the
NXT brick.The robot is placed on the tracer chart given and the run button is pressed.The
robot then performs the intented task.

You might also like