Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

Sensing Colors with ProBot

Program through EDVON to make your robot work!


Interfacing Color Sensors with
ProBot
PRINTING VALUES USING SINGLE COLOR
SENSOR WITH EDVON SOFTWARE
Step#1
Go into the “Robots”
script block in
EDVON software.
As you can see,
there are no sub-
blocks in that
particular block.
Step#2
To make the
options appear
in the “Robots”
block, click on
the “Extensions”
option in the ROBOTS’
menu bar, and SUB-BLOCKS
check “EDVON”.
Step#3
Drag “EDVON
Robot” sub-
block/option into
script area.
FOR PROBOT
INFRARED
SENSORS
Step#4
From the “Control”
block, drag
“Forever” into script
area, and attach to
“EDVON Robot”.
Step#5

Make a variable
“IRS” by going into
“Data & Blocks”.
Step#6
From “Data & Blocks”, drag “set IRS to ---” into “forever” and
insert in it “Read First Distance Sensor” from “Robots” block.
Select “Second Color Sensor” from drop down options.
Step#7
Click on the “Extensions”
option in the menu bar, and
check “Communication” to
display options for printing
color values.
From “Communication” extension of “Robots” block,
insert “send command var = value” into “forever”.
In “var” type the variable name (i.e. IRS) and insert the
variable from “Data & Blocks” into “value”.

Step#8
Step#9
From “Control” block, insert “wait --- secs” into
“forever” to provide some delay before values
are sensed and printed.
Click on your written script to view the true
Step#10 code, and select the “Upload to Probot”
option.

CLICK HERE TO UPLOAD


PROGRAM TO PROBOT
Interfacing Color Sensors with
ProBot
PRINITING VALUES USING ALL THREE
SENSORS WITH EDVON SOFTWARE
Step#1
Drag “EDVON
Robot” sub-
block/option into
script area.
FOR PROBOT
INFRARED
SENSORS
Step#2
From the “Control”
block, drag
“Forever” into script
area, and attach to
“EDVON Robot”.
Make variables “IRS2”, “IRS3”, and “IRS4”
for each sensor by going into “Data &
Blocks”. Step#3
Step#4
Insert “set IRS2 to ---”,
“set IRS3 to ---” and
“set IRS4 to ---” from
“Data & Blocks” into
“forever”.
Step#5
In “set IRS2 to value ---” insert “Read Second Color
Sensor”, in “set IRS3 to value ---” insert “Read Third
Color Sensor” and in “set IRS4 to value ---” insert “Read
Fourth Color Sensor” from the “Robots” block.
Step#6 From “Communication”
extension of “Robots”
block, insert “send
command var = value”
into “forever”.
In “var” type the
variable name (i.e.
IRS2/IRS3/IRS4) and
insert the variable from
“Data & Blocks” into
“value”.
Step#7
From “Control”
block, insert “wait
--- secs” into
“forever” to
provide some
delay before
values are sensed
and printed.
Click on your written script to view the true
Step#8 code, and select the “Upload to Probot”
option.

CLICK HERE TO
UPLOAD
PROGRAM TO
PROBOT
Making a Line Following
ProBot
DIRECTING MOTORS THROUGH COLOR
SENSORS WITH EDVON SOFTWARE
Step#1
Drag “EDVON
Robot” sub-
block/option into
script area.
FOR PROBOT
INFRARED
SENSORS
Step#2
From the “Control”
block, drag
“Forever” into script
area, and attach to
“EDVON Robot”.
Make variables “IRS2”, “IRS3”, and “IRS4”
for each sensor by going into “Data &
Blocks”. Step#3
Step#4
Insert “set IRS2 to ---”,
“set IRS3 to ---” and
“set IRS4 to ---” from
“Data & Blocks” into
“forever”.
Step#5
In “set IRS2 to value ---” insert “Read Second Color
Sensor”, in “set IRS3 to value ---” insert “Read Third
Color Sensor” and in “set IRS4 to value ---” insert “Read
Fourth Color Sensor” from the “Robots” block.
Step#6
From the previous two programs, it was found that
BLACK color showed values of approximately 935, thus
proving that it absorbs all radiations.
On the other hand, WHITE had values approximately
around 50, proving that it reflects all radiations.
Take average of these values to calculate THRESHOLD
value which is almost equal to 500.
Use this value in conditional relations for your script. i.e.
greater than 500 = black, less than 500 = white.
Step#7
Insert three “if-then”
condition blocks from
“Control” inside
“forever”, one for each
infrared sensor.
Step#8
After every “if”, insert
“--- > 500” from the
“Operators” block.
Add three variables
from “Data & Blocks”
to complete the
relational condition.
Step#9
When value is greater
than 500 for CENTRE
COLOR SENSOR (IRS3), the
motors must run
FORWARD at SAME SPEED
to FOLLOW the black line.
Use “Robots” block to
develop script accordingly.
Step#10
When value is greater
than 500 for RIGHT
COLOR SENSOR (IRS2),
the bot must turn RIGHT
to AVOID the black line.
Thus, RIGHT MOTOR
RUNS SLOWER THAN
LEFT. Use “Robots” block
to develop script
accordingly.
Step#11
When value is greater
than 500 for LEFT
COLOR SENSOR (IRS4),
the bot must turn LEFT
to AVOID the black line.
Thus, LEFT MOTOR
RUNS SLOWER THAN
RIGHT. Use “Robots”
block to develop script
accordingly.
Click on your written script to view the true
Step#12 code, and select the “Upload to Probot”.

CLICK HERE TO UPLOAD


PROGRAM TO PROBOT

You might also like