# I really reed Help on autonomous mobile robot programming code?

Hi,

I am a new member here, and I have almost zero knowledge about Arduino programming. I am currently doing a school project, an autonomous mobile robot. I have two more days before the deadline of my project, and am really hope someone can help with my programming..

My robot have two DC motor and two IR sensors. what i want the robot to do is to simply avoid any obstacle in front. The obstacle detection must be around 10 to 30cm. In simple, if the left side IR sensor detect an obstacle, the robot will move to right direction, if possible by making a 90 deg turn. And same happen if the right side IR sensor detect an obstacle..

there is also a mechanical contact sensor behind the robot. If the contact sensor hits an obstacle, the robot will simply move forward..

Hope someone can help me by providing a code for the above algorithm..I will list your name in my project report as an honor..that is the least i can do for anyone who can kindly help me..

thanks.

As you did not post any code I presume you don't have any.

I know a little about Arduino programming and there is NO possibility that I could write a robot program within 48 hours even if I never went to bed.

...R

I have two more days before the deadline of my project

You have left it a little late for us to do your assignment don't you think ? How many days did you have originally to do this ?

Was the assignment to write the program or to find someone to write it for you ?

``````  int enable=2;         //Enable pins of L239D are connected to Arduino digital pin2
int motA1=4;          //pin-2 of L239D is connected to Arduino digital pin4
int motA2=5;          //pin-7 of L239D is connected to Arduino digital pin5
int motB1=6;          //pin-10 of L239D is connected to Arduino digital pin6
int motB2=7;          //pin-15 of L239D is connected to Arduino digital pin7
int senA1=A1;          //sensorA IR  wire is connected to Arduino analog pin A1
int senB1=A0;          //sensorB IR  wire is connected to Arduino analog pin A0

void setup()
``````

This is the beginning of my code..and I am only able to reach this part..

UKHeliBob:
You have left it a little late for us to do your assignment don't you think ? How many days did you have originally to do this ?

Was the assignment to write the program or to find someone to write it for you ?

Well it is actually a group project to be completed in two weeks. I am in charge with the robot fabrication process..and now and the person who is responsible with the programming part quit the group..therefore i have no choice but to assume his role and i have no experience with programming..that why i come here for help..

Jezz8:
therefore i have no choice but to assume his role and i have no experience with programming..that why i come here for help..

Fair enough - that sort of thing happens.

But you can't just drop a lump of code on the table and shout HELP. You need to explain in as much detail as you can what your code is supposed to do (and how it is organised), what it actually does and what more you want it to do.

...R