SlideShare uma empresa Scribd logo
1 de 10
Aaron Truitt, Reyna Monrreal, and Pengcheng Zhai
Professor Oruklu – TA Linjie Li - ECE 100-004
PROBLEM STATEMENT:
The objective is to program a robot using Handy board/
interactive C in order to go through a maze in a quick and
efficient manner . The maze is unknown so the
timing, speed, and interactive C code will be the variables
we are allowed to control & aid the robot into the
undisclosed maze.

Reyna
INVESTIGATION/ RESEARCH:
Handy bugs are small robots that can be manipulated to do a series of
functions. They allow us to program them to the tenth of a second or to a
random program (where we put it in the code to do a random operation).
This will make to “turtle” move around the maze and with each mistake or
flaw noticed we can quickly make adjustments without dismantling the
whole robot. Getting the robot to have good maneuvering skills in order
to win the race is a process of constant trial and error.
With each modification we get we have to change certain aspects of the
small robot to accommodate for those changes. A situation that came
across was the moment when the robot hits a perfect right angle and it
continues to perform as programmed becoming further stuck.
One of the ways we dealt with this was using what is called a random in the
code. The random performed a large turn when it was enabled. Enabled
after 3-4 bumps on the right angle it made a complete turn so as to get
unstuck (an emergence (Martin 2001).

Reyna
CONSTRAINTS & SUB-PROBLEMS
The speed prevents the handy bug from making good turns. The speed was
a good idea in theory, the time to cross the maze would be less and the
program gave less time for turns (Sleep.9) so the angle became less
when it turned and it would be first to finish. Metasens4.ic
A small issue that constantly came up would be the installing of the cables
into the ports, if they were in backwards our wheels would go to
opposite way and affected the robots ability to escape emergence(going
back and forth on a corner)
When the test was conducted to prove the efficiency of the handy bug, it u
fortunately came out of the entrance. This was believed it was due to
probability. However the robot turned at an angle that was too wide for
it to bump against the wall in order to continent going forward.
A shorter angle was programmed and as the handy bug hit the wall it went
backwards rested for a fraction of a second and made a smaller turn
angle. This again prevented it from going out of the entrance.
The programming however still needed less time due to the consistent
Reyna
problem of exiting thought the entrance.
Alternative Solution random.ic

forward
while(1)

left touch?

yes

yes

recent?

yes

5 times?

no

left avoid

left avoid

random avoid

reset timer

yes

reset timer

bump=1

right
touch?

reset timer

incr.bump

bump=0

recent?

yes

yes

5 times?

right avoid

right avoid

random avoid

reset timer

reset timer

reset timer

bump=1

incr, bump

bump=0

Pengcheng Zhai
forward

Alternative Solution turnaround.ic

while(1)

left touch?

yes

yes

recent?

yes

3 times?

no

left avoid

left avoid

turnaround towards right

reset timer

yes

reset timer

bump=1

right
touch?

reset timer

incr.bump

bump=0

recent?

yes

yes

3 times?

right avoid

right avoid

reset timer

reset timer

bump=1

incr, bump

turnaround towards left

reset timer

bump=0

Pengcheng Zhai
Optimum solution
• different floating numbers
void left_avoid() { backward();
sleep(.4); right(); sleep(.4);}void
right_avoid() { backward(); sleep(.4);
left(); sleep(.4);

0.4 second turning sleep time approximately 150º
angles turn

void left_avoid() { backward();
sleep(.15); right(); sleep(.15);}void
right_avoid() { backward(); sleep(.15);
left(); sleep(.15);

Vs.
0.15 second turning sleep time approximately
45º angles turn

• Main method
void random_avoid() {
backward(); sleep(.4);
set_beeper_pitch(1000.);
beeper_on(); if (random(2) ==
0 ) left(); else right();
sleep((float) random(100)/100. +
.5); beeper_off();
undeclared direction
while(1)
{forward();
if
(digital(10) )
{if (timer()< 2.)
{if (recent_bumps ==5)
{random_avoid();
reset_timer();
recent_bumps= 0;

5 times bumps and less than 2
seconds

void main(){ int recent_bumps=0; reset_timer();
if (digital(10) )
{if (timer()< 2.)
{if
(recent_bumps ==3)
{right();
sleep(.3);
reset_timer();
recent_bumps= 0;
}
else
{left_avoid();
reset_timer();
recent_bumps++;
}
}
else {
left_avoid();
reset_timer();
recent_bumps= 1;
}
}
if
(digital(RIGHT_TOUCH) )
{if (timer()< 2.)
{if (recent_bumps ==3)
{left();
sleep(.3);
reset_timer();
recent_bumps= 0;
}
else
{right_avoid();
reset_timer();
recent_bumps++;
}
}
else
{right_avoid();
reset_timer();
recent_bumps=1;
}
} }}

3 times bumps less than 2 second;
100% chance to turnaround after 3 bumps.

Pengcheng Zhai
Optimization in Construction

•
•
•
•

Lowered center of gravity
Structural stability
1:1 Gear Ratio
Extended bumpers

Aaron Truitt
ANALYSIS AND TESTING
• Tested in maze scenarios.
• Steady results and reliable outcomes
• Average time of 56.7 seconds in lab tests per
maze completion.
• Durability

Aaron Truitt
FINAL EVALUATION
•

Best Solution For Your Business.

•

Our Design team has more ideas to
come!

int LEFT_MOTOR= 1;
int RIGHT_MOTOR= 3;
void forward()
{
fd(LEFT_MOTOR);
fd(RIGHT_MOTOR);
}

void right_avoid() {
backward(); sleep(.15);
left(); sleep(.15);
}
void main()
{
int recent_bumps=0;
reset_timer();

void backward()
{
bk(LEFT_MOTOR);
bk(RIGHT_MOTOR);
}

while(1)
{forward();
if (digital(10) )
{if (timer()< 2.)
{if (recent_bumps ==3)
{right();
sleep(.3);
reset_timer();
recent_bumps= 0;
}
else {left_avoid();
reset_timer();
recent_bumps++;
}
}
else { left_avoid();
reset_timer();
recent_bumps= 1;
}
}
if (digital(RIGHT_TOUCH) )
{if (timer()< 2.)
{if (recent_bumps ==3)
{left();
sleep(.3);
reset_timer();
recent_bumps= 0;
}
else {right_avoid();
reset_timer();
recent_bumps++;
}
}
else {right_avoid();
reset_timer();
recent_bumps=1;
}
}
}

void right()
{
fd(LEFT_MOTOR);
bk(RIGHT_MOTOR);
}
void left()
{
bk(LEFT_MOTOR);
fd(RIGHT_MOTOR);
}
void stop()
{
off(LEFT_MOTOR);
off(RIGHT_MOTOR);
}

int LEGHT_TOUCH= 10;
int RIGHT_TOUCH= 11;
float _timer;
void reset_timer() {
_timer= seconds();
}
float timer() {
return seconds() _timer;
}
}
void left_avoid() {
backward(); sleep(.15);
right(); sleep(.15);
}

}

Mais conteúdo relacionado

Semelhante a HandyBug Robot

Maze Solver Robot using Arduino
Maze Solver Robot using ArduinoMaze Solver Robot using Arduino
Maze Solver Robot using ArduinoGautamJagdhish
 
Independent design project
Independent design projectIndependent design project
Independent design projectFabian Okidi
 
Beginners guide vibration
Beginners guide vibrationBeginners guide vibration
Beginners guide vibrationKasinathan PMP
 
Beginners guide vibration
Beginners guide vibrationBeginners guide vibration
Beginners guide vibrationnagasqueen
 
Beebe - Balancing by timed oscillation (AUS)
Beebe - Balancing by timed oscillation (AUS)Beebe - Balancing by timed oscillation (AUS)
Beebe - Balancing by timed oscillation (AUS)Ray Beebe
 
Why is monitoring vibration important
Why is monitoring vibration importantWhy is monitoring vibration important
Why is monitoring vibration importantFabinhoGarcia
 
ROBOTICS-ROBOT KINEMATICS AND ROBOT PROGRAMMING
ROBOTICS-ROBOT KINEMATICS AND ROBOT PROGRAMMINGROBOTICS-ROBOT KINEMATICS AND ROBOT PROGRAMMING
ROBOTICS-ROBOT KINEMATICS AND ROBOT PROGRAMMINGTAMILMECHKIT
 
Robotics using EV3 Introduction
Robotics using EV3 Introduction Robotics using EV3 Introduction
Robotics using EV3 Introduction Puneet Kumar
 
The Charming Genius of the Apollo Guidance Computer
The Charming Genius of the Apollo Guidance ComputerThe Charming Genius of the Apollo Guidance Computer
The Charming Genius of the Apollo Guidance ComputerBrian Troutwine
 

Semelhante a HandyBug Robot (11)

Maze Solver Robot using Arduino
Maze Solver Robot using ArduinoMaze Solver Robot using Arduino
Maze Solver Robot using Arduino
 
Independent design project
Independent design projectIndependent design project
Independent design project
 
Sphero Write Up
Sphero Write UpSphero Write Up
Sphero Write Up
 
Beginners guide vibration
Beginners guide vibrationBeginners guide vibration
Beginners guide vibration
 
Beginners guide vibration
Beginners guide vibrationBeginners guide vibration
Beginners guide vibration
 
Beebe - Balancing by timed oscillation (AUS)
Beebe - Balancing by timed oscillation (AUS)Beebe - Balancing by timed oscillation (AUS)
Beebe - Balancing by timed oscillation (AUS)
 
Why is monitoring vibration important
Why is monitoring vibration importantWhy is monitoring vibration important
Why is monitoring vibration important
 
Lecture2
Lecture2Lecture2
Lecture2
 
ROBOTICS-ROBOT KINEMATICS AND ROBOT PROGRAMMING
ROBOTICS-ROBOT KINEMATICS AND ROBOT PROGRAMMINGROBOTICS-ROBOT KINEMATICS AND ROBOT PROGRAMMING
ROBOTICS-ROBOT KINEMATICS AND ROBOT PROGRAMMING
 
Robotics using EV3 Introduction
Robotics using EV3 Introduction Robotics using EV3 Introduction
Robotics using EV3 Introduction
 
The Charming Genius of the Apollo Guidance Computer
The Charming Genius of the Apollo Guidance ComputerThe Charming Genius of the Apollo Guidance Computer
The Charming Genius of the Apollo Guidance Computer
 

Último

Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作f3774p8b
 
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls DubaiDubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubaikojalkojal131
 
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls in Delhi
 
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...Amil baba
 
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...Amil Baba Dawood bangali
 
RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作f3774p8b
 
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...Amil baba
 
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一diploma 1
 
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)861c7ca49a02
 
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degreeyuu sss
 
the cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptxthe cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptxLeaMaePahinagGarciaV
 
萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程1k98h0e1
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRdollysharma2066
 
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作ss846v0c
 
Hindu amil baba kala jadu expert in pakistan islamabad lahore karachi atar ...
Hindu amil baba kala jadu expert  in pakistan islamabad lahore karachi atar  ...Hindu amil baba kala jadu expert  in pakistan islamabad lahore karachi atar  ...
Hindu amil baba kala jadu expert in pakistan islamabad lahore karachi atar ...amilabibi1
 
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degreeyuu sss
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Servicesnajka9823
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degreeyuu sss
 

Último (20)

Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
 
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls DubaiDubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
 
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
 
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
 
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...
 
RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作
 
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
young call girls in  Khanpur,🔝 9953056974 🔝 escort Serviceyoung call girls in  Khanpur,🔝 9953056974 🔝 escort Service
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
 
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
 
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
 
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
 
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
 
the cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptxthe cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptx
 
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Serviceyoung call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
 
萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
 
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
 
Hindu amil baba kala jadu expert in pakistan islamabad lahore karachi atar ...
Hindu amil baba kala jadu expert  in pakistan islamabad lahore karachi atar  ...Hindu amil baba kala jadu expert  in pakistan islamabad lahore karachi atar  ...
Hindu amil baba kala jadu expert in pakistan islamabad lahore karachi atar ...
 
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
 

HandyBug Robot

  • 1. Aaron Truitt, Reyna Monrreal, and Pengcheng Zhai Professor Oruklu – TA Linjie Li - ECE 100-004
  • 2. PROBLEM STATEMENT: The objective is to program a robot using Handy board/ interactive C in order to go through a maze in a quick and efficient manner . The maze is unknown so the timing, speed, and interactive C code will be the variables we are allowed to control & aid the robot into the undisclosed maze. Reyna
  • 3. INVESTIGATION/ RESEARCH: Handy bugs are small robots that can be manipulated to do a series of functions. They allow us to program them to the tenth of a second or to a random program (where we put it in the code to do a random operation). This will make to “turtle” move around the maze and with each mistake or flaw noticed we can quickly make adjustments without dismantling the whole robot. Getting the robot to have good maneuvering skills in order to win the race is a process of constant trial and error. With each modification we get we have to change certain aspects of the small robot to accommodate for those changes. A situation that came across was the moment when the robot hits a perfect right angle and it continues to perform as programmed becoming further stuck. One of the ways we dealt with this was using what is called a random in the code. The random performed a large turn when it was enabled. Enabled after 3-4 bumps on the right angle it made a complete turn so as to get unstuck (an emergence (Martin 2001). Reyna
  • 4. CONSTRAINTS & SUB-PROBLEMS The speed prevents the handy bug from making good turns. The speed was a good idea in theory, the time to cross the maze would be less and the program gave less time for turns (Sleep.9) so the angle became less when it turned and it would be first to finish. Metasens4.ic A small issue that constantly came up would be the installing of the cables into the ports, if they were in backwards our wheels would go to opposite way and affected the robots ability to escape emergence(going back and forth on a corner) When the test was conducted to prove the efficiency of the handy bug, it u fortunately came out of the entrance. This was believed it was due to probability. However the robot turned at an angle that was too wide for it to bump against the wall in order to continent going forward. A shorter angle was programmed and as the handy bug hit the wall it went backwards rested for a fraction of a second and made a smaller turn angle. This again prevented it from going out of the entrance. The programming however still needed less time due to the consistent Reyna problem of exiting thought the entrance.
  • 5. Alternative Solution random.ic forward while(1) left touch? yes yes recent? yes 5 times? no left avoid left avoid random avoid reset timer yes reset timer bump=1 right touch? reset timer incr.bump bump=0 recent? yes yes 5 times? right avoid right avoid random avoid reset timer reset timer reset timer bump=1 incr, bump bump=0 Pengcheng Zhai
  • 6. forward Alternative Solution turnaround.ic while(1) left touch? yes yes recent? yes 3 times? no left avoid left avoid turnaround towards right reset timer yes reset timer bump=1 right touch? reset timer incr.bump bump=0 recent? yes yes 3 times? right avoid right avoid reset timer reset timer bump=1 incr, bump turnaround towards left reset timer bump=0 Pengcheng Zhai
  • 7. Optimum solution • different floating numbers void left_avoid() { backward(); sleep(.4); right(); sleep(.4);}void right_avoid() { backward(); sleep(.4); left(); sleep(.4); 0.4 second turning sleep time approximately 150º angles turn void left_avoid() { backward(); sleep(.15); right(); sleep(.15);}void right_avoid() { backward(); sleep(.15); left(); sleep(.15); Vs. 0.15 second turning sleep time approximately 45º angles turn • Main method void random_avoid() { backward(); sleep(.4); set_beeper_pitch(1000.); beeper_on(); if (random(2) == 0 ) left(); else right(); sleep((float) random(100)/100. + .5); beeper_off(); undeclared direction while(1) {forward(); if (digital(10) ) {if (timer()< 2.) {if (recent_bumps ==5) {random_avoid(); reset_timer(); recent_bumps= 0; 5 times bumps and less than 2 seconds void main(){ int recent_bumps=0; reset_timer(); if (digital(10) ) {if (timer()< 2.) {if (recent_bumps ==3) {right(); sleep(.3); reset_timer(); recent_bumps= 0; } else {left_avoid(); reset_timer(); recent_bumps++; } } else { left_avoid(); reset_timer(); recent_bumps= 1; } } if (digital(RIGHT_TOUCH) ) {if (timer()< 2.) {if (recent_bumps ==3) {left(); sleep(.3); reset_timer(); recent_bumps= 0; } else {right_avoid(); reset_timer(); recent_bumps++; } } else {right_avoid(); reset_timer(); recent_bumps=1; } } }} 3 times bumps less than 2 second; 100% chance to turnaround after 3 bumps. Pengcheng Zhai
  • 8. Optimization in Construction • • • • Lowered center of gravity Structural stability 1:1 Gear Ratio Extended bumpers Aaron Truitt
  • 9. ANALYSIS AND TESTING • Tested in maze scenarios. • Steady results and reliable outcomes • Average time of 56.7 seconds in lab tests per maze completion. • Durability Aaron Truitt
  • 10. FINAL EVALUATION • Best Solution For Your Business. • Our Design team has more ideas to come! int LEFT_MOTOR= 1; int RIGHT_MOTOR= 3; void forward() { fd(LEFT_MOTOR); fd(RIGHT_MOTOR); } void right_avoid() { backward(); sleep(.15); left(); sleep(.15); } void main() { int recent_bumps=0; reset_timer(); void backward() { bk(LEFT_MOTOR); bk(RIGHT_MOTOR); } while(1) {forward(); if (digital(10) ) {if (timer()< 2.) {if (recent_bumps ==3) {right(); sleep(.3); reset_timer(); recent_bumps= 0; } else {left_avoid(); reset_timer(); recent_bumps++; } } else { left_avoid(); reset_timer(); recent_bumps= 1; } } if (digital(RIGHT_TOUCH) ) {if (timer()< 2.) {if (recent_bumps ==3) {left(); sleep(.3); reset_timer(); recent_bumps= 0; } else {right_avoid(); reset_timer(); recent_bumps++; } } else {right_avoid(); reset_timer(); recent_bumps=1; } } } void right() { fd(LEFT_MOTOR); bk(RIGHT_MOTOR); } void left() { bk(LEFT_MOTOR); fd(RIGHT_MOTOR); } void stop() { off(LEFT_MOTOR); off(RIGHT_MOTOR); } int LEGHT_TOUCH= 10; int RIGHT_TOUCH= 11; float _timer; void reset_timer() { _timer= seconds(); } float timer() { return seconds() _timer; } } void left_avoid() { backward(); sleep(.15); right(); sleep(.15); } }