46
Figure .3.2.14 Diagram of Data with Obstacles
const int leftPin
=
A3
;
const int rightPin
=
A4
;
int
dl
;
int
dr
;
void setup
()
{
Serial
.
begin
(
9600
);
pinMode
(
leftPin
,
INPUT
);
pinMode
(
rightPin
,
INPUT
);
delay
(
1000
);
}
void loop
()
{
dl
=
analogRead
(
leftPin
);
dr
=
analogRead
(
rightPin
);
Serial
.
(
"left:"
);
Serial
.
(
dl
);
Serial
.
(
" "
);
Serial
.
(
"right:"
);
Serial
.
println
(
dr
);
}
Summary of Contents for Hummer-Bot-1.0
Page 1: ...Hummer Bot 1 0 Instruction Manual V 2 0 ...
Page 18: ...15 Step4 You need to install motors Figure 3 1 5 Schematic diagram of motor installation ...
Page 50: ...47 Figure 3 2 15 Diagram of Data without Obstacles ...
Page 83: ...80 Test code Path hummer bot Lesson ModuleDemo IrkeyPressed IrkeyPressed ino ...