Let's Make Robots!

how to build the source code....

hi...i'm fizan from malaysia...i have to implement a project for fullfill my study...i was developed a robot..but i had a problem to build the robot's source code...for your information i'm using one infrared sensor (GP2D12) to detect the obstacles...but i want the sensor spinning to detect the obstacles....if don't mind can u help me to create the source code by using C languange....thank you for your co-operation...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
i use 2 servo motor for motion the robot...now i don't know how to create the program for sensor and servo motor using C language....
ignoblegnome's picture

What is your programming experience? Are you already familiar with programming in C or another language? Are you looking for guidance on the logic for your code or are you looking for a primer on programming in C?

There are lots of code examples on this site for controlling servos and using sensors. Not all of the examples are in C, but if you just need help with the approach and logic, they will be helpful.

TeleFox's picture
Do you need to write or compile the code? Do you have any code so far? If the robot controlled from the computer, or does it have its own microcontroller?
my robot controlled by microcontroller PIC16F877A...
TeleFox's picture
Are you using MPLAB IDE to program the robot? What method is used to flash the PIC, ICSP?
Do you have any hardware already built/bought apart from the sensors?
yup..i'm using MPLAB IDE to program the robot..but i don't understand what the method u say...
TeleFox's picture
Don't worry about the programming method for now. Apart from the GP2D12 and the PIC16F877A, do you have any other hardware you want/need to use?
ignoblegnome's picture

I recommend you review the info at the "Start here" link at the top of the website. There is a complete walk through on building an example robot. The example is not in C, but it should give you a starting point, including using a Sharp IR sensor for avoiding obstacles.

There is a lot of useful information and helpful people on this site, but you need to do your own research and take initiative to build your own robot.

Good luck!

 

Simon Z's picture

Could you be more specific. Show us what you have done so far. A robot, the source code, the C language are all very general terms.

Oh, And your title "how to build the source code" might easy be misunderstood for something else.

my project title is "algorithm and development of obstacle avoidance robot".this robot will detect and avoid from the obstacle.i'm using one infrared sensor to detect and avoid obstacle...the sensor will be spinning to sense the obstacle...so my problem is how  to create the program by using C language....