Posted on by & filed under Arduino Tutorials, How To Make a Robot, Software and Apps.

How to make a robot: lesson 10

Lessons Menu:

Programming is usually the final step involved in building a robot. If you followed the lessons, so far you have chosen the actuators, electronics, sensors and more, and have assembled the robot so it hopefully looks something like what you had initially set out to build. Without programming though, the robot is a very nice looking and expensive paperweight.

It would take much more than one lesson to teach you how to program a robot, so instead, this lesson will help you with how to get started and where (and what) to learn. The practical example will use “Processing”, a popular hobbyist programming language intended to be used with the Arduino microcontroller chosen in previous lessons. We will also assume that you will be programming a microcontroller rather than software for a full-fledged computer.

What Language to Choose?

Programming Robot from syraweb.orgThere are many programming languages which can be used to program microcontrollers, the most common of which are:

  • Assembly; its just one step away from machine code and as such it is very tedious to use. Assembly should only be used when you need absolute instruction-level control of your code.
  • Basic; one of the first widely used programming languages, it is still used by some microcontrollers (Basic Micro, BasicX, Parallax) for educational robots.
  • C/C++; one of the most popular languages, C provides high-level functionality while keeping a good low-level control.
  • Java; it is more modern than C and provides lots of safety features to the detriment of low-level control. Some manufacturers like Parallax make microcontrollers specifically for use with Java.
  • .NET/C#; Microsoft’s proprietary language used to develop applications in Visual Studio. Examples include Netduino, FEZ Rhino and others).
  • Processing (Arduino); a variant of C++ that includes some simplifications in order to make the programming for easier.
  • Python, one of the most popular scripting languages. It is very simple to learn and can be used to put programs together very fast and efficiently.

In lesson 4, you chose a microcontroller based on the features you needed (number of I/O, user community, special features, etc). Often times, a microcontroller is intended to be programmed in a specific language. For example:

If you have chosen a hobbyist microcontroller from a known or popular manufacturer, there is likely a large book available so you can learn to program in their chosen programming language. If you instead chose a microcontroller from a smaller, lesser known manufacturer (e.g. since it had many features which you thought would be useful for your project), it’s important to see what language the controller is intended to be programmed in (C in many cases) and what development tools are there available (usually from the chip manufacturer).

Getting Started

Hello World PSPThe first program you will likely write is  “Hello World” (referred to as such for historic reasons). This is one of the simplest programs that can be made in a computer and is intended to print a line of text (e.g. “Hello World”) on the computer monitor or LCD screen. In the case of a microcontroller, another very basic program you can do that has an effect on the outside world (rather than just on-board computations) is toggling an IO pin. Connecting an LED to and I/O pin then setting the I/O pin to ON and OFF will make the LED blink. Although the simple act of turning on an LED may seem basic, the function can allow for some complex programs (you can use it to light up multi-segment LEDs, to display text and numbers, operate relays, servos and more).

Step 1: Ensure you have all components needed to program the microcontroller

Not all microcontrollers come with everything you need to program them, and most microcontrollers need to be connected to a computer via USB plug. If your microcontroller does not have a USB or DB9 connector, then you will need a separate USB to serial adapter, and wire it correctly. Fortunately many hobbyist microcontrollers are programmable either via an RS-232 port or by USB, and include the USB connector on-board which is used not only for two-way communication, but also to power the microcontroller board.

Step 2: Connect the microcontroller to the computer and verify which COM port it is connected to. Not all microcontrollers will be picked up by the computer and you should read the “getting started” guide in the manual to know exactly what to do to have your computer recognize it and be able to communicate with it. You often need to download “drivers” (specific to each operating system) to allow your computer to understand how to communicate with the microcontroller and/or the USB to serial converter chip.

Step 3: Check product’s user guide for sample code and communication method / protocol

Don’t reinvent the wheel if you don’t have to. Most manufacturers provide some code (or pseudo code) explaining how to get their product working. The sample code may not be in the programming language of your choice, but don’t despair; do a search on the Internet to see if other people have created the necessary code.

  • Check product manuals / user guides
  • Check the manufacturer’s forum
  • Check the internet for the product + code
  • Read the manual to understand how to write the code

Useful Tips

  1. Create manageable chunks of functional code: By creating segments of code specific to each product, you gradually build up a library. Develop a file system on your computer to easily look up the necessary code.
  2. Document everything within the code using comments: Documenting everything is necessary in almost all jobs, especially robotics. As you become more and more advanced, you may add comments to general sections of code, though as you start, you should add a comment to (almost) every line.
  3. Save different versions of the code – do not always overwrite the same file: if you find one day that your 200+ lines of code do not compile, you won’t be stuck going through it line by line; instead you can revert to a previously saved (and functional) version and add / modify it as needed. Code does not take up much space o a hard drive, so you should not feel pressured to only save a few copies.
  4. Raise the robot off the table or floor when debugging (so its wheels/legs/tracks don’t accidentally launch it off the edge), and have the power switch close by in case the robot tries to destroy itself. An example of this is if you try to send a servo motor to a 400us signal when it only accepts a 500 (corresponding to 0 degrees) to 2500us (corresponding to 180 degrees) signal. The servo would try to move to a location which it cannot physically go to (-9 degrees) and ultimately burn out.
  5. If code does something that does not seem to be working correctly after a few seconds, turn off the power – it’s highly unlikely the problem will “fix itself” and in the meantime, you may be destroying part of the mechanics.
  6. Subroutines may be a bit difficult to understand at first, but they greatly simplify your code. If a segment of code is repeated many times within the code, it is a good candidate to be replaced with a subroutine.

Practical Example

Arduino UnoWe have chosen an Arduino microcontroller to be the “brain” of our robot. To get started, we can take a look at the Arduino 5 Minute Tutorials. These tutorials will help you use and understand the basic functionality of the Arduino programming language. Once you have finished these tutorials, take a look at the example below.

For the robot we have made, we will create code to have it move around (left, right, forward, reverse), move the two servos (pan/tilt) and communicate with the distance sensor. We chose Arduino because of the large user community, abundance of sample code and ease of integration with other products.

Sharp GP2D120 IR Range Finder
Distance sensor

Fortunately in the Arduino code, there is an example for getting values from an analog sensor. For this, we go to File -> Examples -> Analog -> AnalogInOutSerial (so we can see the values)


Again, we are fortunate to have sample code to operate servos from an Arduino. File -> Examples ->  Servo -> Sweep

Servocity Pan and TiltNote that text after two slashes // are comments and not part of the compiled code

#include <Servo.h>            // This loads the servo script, allowing you to use specific functions below

Servo myservo;                      // create servo object to control a servo
int pos = 0;                             // variable to store the servo position

void setup()                           // required in all Arduino code
myservo.attach(9);             // attaches the servo on pin 9 to the servo object

void loop()                               // required in all Arduino code
for(pos = 0; pos < 180; pos += 1)  // variable ‘pos’ goes from 0 degrees to 180 degrees in steps of 1 degree
myservo.write(pos);              // tell servo to go to position in variable ‘pos’
delay(15);                                 // waits 15ms for the servo to reach the position
for(pos = 180; pos>=1; pos-=1)     // variable ‘pos’ goes from 180 degrees to 0 degrees
myservo.write(pos);              // tell servo to go to position in variable ‘pos’
delay(15);                               // waits 15ms at each degree

Motor Controller

Pololu Serial Motor ControllerHere is where it gets a bit harder, since no sample code is available specifically for the Arduino. The controller is connected to the Tx (serial) pin of the Arduino and waits for a specific “start byte” before taking any action. The manual does indicate the communication protocol required; a string with specific structure:

  • 0x80 (start byte)
  • 0x00 (specific to this motor controller; if it receives anything else it will not take action)
  • motor # and direction (motor one or two and direction explained in the manual)
  • motor speed (hexadecimal from 0 to 127)

In order to do this, we create a character with each of these as bytes within the character:

unsigned char buff[6];

buff[0]=0x80; //start byte specific to Pololu motor controller
buff[1]=0; //Device type byte specific to this Pololu controller
buff[2]=1; //Motor number and direction byte; motor one =00,01
buff[3]=127; //Motor speed “0 to 128” (ex 100 is 64 in hex)


Therefore when this is sent via the serial pin, it will be sent in the correct order.

Putting all the code together makes the robot move forward and sweep the servo while reading distance values.

You can see the full robot and the user manual.



261 Responses to “How to Make a Robot – Lesson 10: Programming Your Robot”

  1. Aghil.ts

    thanks …….
    its realy gr8 ……….
    i like it ,
    i want to study more……
    and how i find this materials ?

  2. cbenson

    You can either learn as part of a school or robotics club, start working with kits or read books. We are trying to put as much information in this blog as we can.

  3. sagy

    very usefull posts.. thank you very much … it has enlarged the picture of robot functioning. very beautifully sequenced explanations and hints .. really appreciate the knowledge and huge thanks for sharing it 🙂

  4. cbenson

    You are welcome. This is a preliminary set of lessons and we plan to improve and add to it.

  5. Rahul P

    Do you give any classes, Sir. These lessons have been really useful to me.

  6. cbenson

    Since we are an online company, we don’t have any locations open to the general public, and as such, cannot give in-person lessons. We may entertain the idea of online classes, but not at this time.

  7. Rahul P

    Is there any source to ask you any questions directly or personally, can i have you email id sir?

    Please dont take it in any bad side or something.

  8. cbenson

    Private questions regarding product selection and support can be asked via the RobotShop Support Center. More public or design related questions can be added to the RobotShop Forum.

  9. Ibukun

    Hi please for my final year project we are building a walking robot. We built the microcontroller from scratch and we wrote our code using mikroc for PIC. The problem now is we have done everything and we re testing the servomotors using a 9V battery that produces a 0.98Amps current. We are making a foru legged robot with 2 limbs each so we are making use of 8 servomotors. The problem is that the actuators have refused to drive the robot. One leg only works when we press the reset button but whenit reaches the 18.5ms pulse width it stops but the motion refuses to move to the next actuator. Please what can we do?

  10. cbenson

    Please contact us via the RobotShop Forum – the Blog is not the best place to do troubleshooting.

  11. Reisangdar

    I don’t hav any projects but m interested in robots…
    dat ws soooooooooooo… AWESOME:-))

  12. Reisangdar

    I don’t hav any projects but m interested in robots…
    dat ws soooooooooooo… AWESOME. :-))

  13. Anurag Verma

    Great Post …..I just have begun learning more and more about robotics and I think it is the best place to help me ….for now

  14. juzz

    it is really a big help for my self to know to a simple robot program thanks

  15. arjun

    it is not understand to all human so please write simple language and sent one copy to my email

  16. buzz

    hey its really cool but how do you start coding I cant open the transcript or anything the terminal on my computer is horrible because when I open its all like “need help sir” jeez plz help I also have rhino 3d and how do you design a robot on that thanks for the great blog

    • Coleman Benson

      The programming language is normally related to the choice of microcontroller, though if you have a single board computer, you have much more leeway. In regard to the 3D CAD program Rhinoceros, it’s really up to you as to what you want to design; the difficulty comes in materializing what you drew.


    What types of project i make for future for world,those are much required for this world please suggest me. I want to developed my own kit.

    • Coleman Benson

      If you are looking to develop / create a consumer product, it’s really up to you to research where there is the greatest need / market potential.

  18. Nagarjun me to bulid a small robot using c coding for my exibition sir.

    • Coleman Benson

      It’s best to create a new topic on the RobotShop Forum. Please explain what you have, your budget and what you want the robot to be able to do.

  19. ken

    I hope that there is a personal tutorial for robotics here in our country…. but thanks for this I learned a lot 🙂

  20. Joseph

    Thank for this website.. may send me a pdf sample of creating robots, please?

  21. ffdgdlgkj1

    sir i really want to learn robot programming please suggest any idea to learn robot programming using .net technology

  22. ALWAR

    sir your lessons are very interesting and great .iam from india i have an project in real time. ofcourse i am contractor for tamarind grading and packing . our customers are noticing me that tamarind seeds in packing ,so i want to rectify this problem . kindly give an suggestion which robot is suitable to my work and is it possible in low cost .
    give me reply to my mail id : [email protected]

  23. Uzyer Razin

    I bookmarked this web. I will come back to continue next posts.Thank You very much for these posts. Have a good day.It’s very useful for everyone for sure.

  24. Classnikz

    I bookmarked this web. I will come back to continue next posts.Thank You very much for these posts. Have a good day.It’s very useful for everyone for sure.

  25. Nick Halterman

    Im having troubles installing the software. Help please?

    • Coleman Benson

      For technical support, it’s best to contact us via the RobotShop Forum with additional details such as which microcontroller you are using, which software you are trying to install, and any errors you get.

  26. Ronald Candil

    I love to study robotic even though i have no robotics materials.

  27. Aditya Gupta

    I love the information you share it really help me a lot but i want to study more about robot programming in more details so that i can explore more about it

  28. chandan

    hey sir please give me programing of temperature based speed of the fan controolled using avr

    • Coleman Benson

      @chandan For troubleshooting and technical support, please create a new topic o the RobotShop Forum and we would be happy to help.

  29. denish patel

    What basic thing to study for robotics progrmming? i know programming.


    sir,please tell me the best robotic programming book name in c language

  31. Joriza Mae

    Nice day Sir!,I was very interested when I read this online article about robotics since I am a Computer science student..but what programming language would i choose so that my robot can talk ?is C++ a useful language and how?

    • Coleman Benson

      @Joriza Mae Do you mean “communicate” as in send data, or actually “speak”? If you mean “speak”, you can use C++, but voice synthesis is really not easy if you start from scratch, and we suggest using a computer, or voice synthesizing module.

    • Coleman Benson

      @lisa “logic” normally refers to the main processor, but the word “logic” is simply a noun, and you need to add context.

  32. lisa

    what are some problems programmers face when programming a robot?

    • Coleman Benson

      @lisa Anything and everything, from not knowing how to begin or lacking knowledge, to the program not working at all or doing something which it was not supposed to do.

  33. happy verma

    iam confusing and want to know that which language is best to do and go with for robotics and also for advanced robotics including some ai techniques

  34. Omkar More

    Please, Suggest for beginner like me, Want to participate in ROBOCON Compilation Of Robotic programming .

  35. KKK

    hi ,want to learn robot programming using c# plz guide me how to go on this way

  36. rushikesh dhuve

    HIIII i want to create a robot using c language plz help me …….

  37. fahad

    It was a very important guide shall I can download this guide as PDF file

  38. Parag Kulkarni

    Hi Benson Sir, Firstly thanks for knowledge sharing approach. I am new in robotics but familiar with C language & created basic gui, game programs etc. Not having microcontroller knowledge. How can I obtain the required knowledge which help in my project. But I need to create my own unit and C program to control fan operations. I would request you to pls guide me from where should I start and what links or material will help me in achieving this complete project pls pls. thanks in advance. Looking for your seriius help as I am really passionate to do that. pls help. thanks.

    • Coleman Benson

      @Parag You need to create your own microcontroller breakout board and then program it in C? If this is the case, you’ll need to choose a C-compatible chip, learn how to create electronics and printed circuit boards (or use a breadboard for prototyping), and learn how to code in C (eiting teaching yourself from a book or online lessons).

  39. shreyas

    I want to create a human detection robot with raspberry pie and I want your help plz guide me I want this robot in the for of spider …..plz tell me which equipments will be needd for this and which language should I prefer

    • Coleman Benson

      shreyas Do you mean in the form of a spider? You should separate your robot into many sub-projects, such as the platform itself, the walking algorithm, and the “human detection” part. We don’t have a complete kit which meets all of your criteria, so what you are doing is building a custom robot.

  40. Pranali

    Hello Sir, these posts were really helpful. Do you know any books that I can refer to for learning more about Robotics ? I am a complete novice and except these articles I know pretty much nothing about the subject.

  41. csan

    sir i want to be robotics engineer and i have keen interest in do you have any idea. i want to develop robots too.

    • Coleman Benson

      @csan The best approach is to follow engineering at university, but theknowledge you gain from simply working on and building your own robots will be most important.

  42. ahmod

    sir can’t i get the books at robot shop for free am a Nigerian please

  43. ahmod

    tank you can i use a phone cheap thats a phone microcontroller to create a robot

    • Coleman Benson

      @ahmod Sort of.. a smartphone tends not to have input / output ports, so you need to interface it with additional hardware which reads sensors and controls motors.

    • Coleman Benson

      @Bla bla An R/C servo is a type of geared motor which allows you to send signals which control the angular position of the output shaft. This is different than a normal DC gear motor where you do not have control over the position.

  44. shreyas

    Can You please tell me how to write a C program for light sensor???

    • Coleman Benson

      @shreyas Unfortunately that is beyond the scope of this tutorial series. Feel free to contact us via the RobotShop Forum and provide as many details as you can about your setup.

  45. Mustafa

    Very nice work, would be good for a science project. Thumbs up.

  46. sk.AZIZUL HASAN.

    It is so nice projact . I love this work.
    How I made a microchip,?????

    • Coleman Benson

      @sk.AZIZUL HASAN. Creating a microchip requires quite a lot of work and machines and normally only large companies tend to create microchips.

  47. Soumya roy

    Sir thnk you verry much…Firstly thanks for knowledge sharing approach..!! Sir want to make a robot..who follows my sir please can u tell me how can i built that robot…

    • Coleman Benson

      @Soumya roy If by “instructions” you mean voice commands, you’ll need a speech to text module, then either a separate micontroller or computer to process those commands and take appropriate action.

  48. Randeep Singh

    I have done my post graduation in computer applications.I love programming and have knowledge of C programming language.I never had microcontrollers as part of my curriculum,but i would love to learn more about robotics.I would like to start from scratch(using c language).what do you suggest?

    • Sébastien Parent-Charette

      There are many options since most microcontrollers have C compilers available. We would recommend to have a look at the Arduino platform since it is readily available, low cost and has great community support. It can also be programmed in C directly (instead of using Sketches) in the Arduino IDE. A good resource for AVR related C programming is

    • Sébastien Parent-Charette

      @doyin: You can use various products to add voice recognition to your robot, such as the RB-Tig-12, RB-Mik-46 and RB-Lin-79. Please note that if you wish to make your own module, it is a very complex task that is non-trivial. You can read more about speech recognition here.

  49. vignesh

    thanks for sharing the program… it was awesome… reallly iam interested in c/c++ language and robotics with a little knowledge about them…. but what can i do just with them i need hardware etc..etc. iam eager to program and see the output of robot… but environment and situation says a big NO………. sorry for texting unwanted feelings….. really thanks a lot the session was great… wish you all the best and good luck… bye

  50. BELLO

    I want to express my deeper appreciation for your tireless effort in passing knowledge that someone like me would not have been enjoying without people like you. I am a beginner who is confused with how to start the journey of developing robotic projects because of the fact that the major components are not available at my disposal and I have no friends who can collaborate with me. Advise me please. Thanks

    • Sébastien Parent-Charette

      @Danny: Which part of the robot programming would you want to do using MySQL? It is certainly possible to program higher-level functions, such as a state machine using a relational database and stored procedures, but the low-level interface to the hardware will need to use a programming language, libraries or a framework that is understood by the platform itself.


    i like machine, because machines is very usefull things ,without machines not any work is eassely.


    i like robotes nd i thinks that robotes are friend in human life, its your works is eassely completed

  53. Al Haadi (Haider Rauf Gujjar)

    Insha’ALLAH One Day I Will Make A ROBOT <3

  54. nasar

    sir i wanna start proper work on robots . but i wan to start from basic level so please guide me . i have knowledge about robot but i wanna attach the electrical/electronic components with microprocessor/microcontroller so please help me

  55. Chhaya Verma

    Thank you ! Sir Benson. Really Awesome Blog.It really helps. I am trying to make a robot.

  56. Long

    Thank you very much! All of lessons help me a lots because i’m interested in making robot. But i don’t know how to begin. Thank you

    • Coleman Benson

      @Long It’s quite a big field, so you can start almost anywhere. We suggest either starting with a robot kit wihch has everything you need, or starting with a simple wheeled robot with one or two sensors.

  57. Gomo

    interesting and helpful. i want to build a bomb and gun detector but am confuse on how to get material. pease sir help me again.

    • Coleman Benson

      @Bharath If the microcontroller used on a robot can be programmed in C++, then you have no issue. C++ however is not very common in robotics / microcontrollers.

  58. sk.AZIZUL HASAN.

    Sir thank you very much . There all lessons are help me a humanoid robots legs madeing.

  59. Tara

    And to think i was going to make a humanoid as my first project haha, obviously not now.
    And I see the kits are the best way to begin a robot project then
    These lessons were amazing and useful thanks! :):)

    • Coleman Benson

      @Tara A custom humanoid is certainly not the place to start; you can try a humanoid kit, but “learning” is really limited to simply making it walk. A good started kit which includes a microcontroller and sensors is the best way to get your hands dirty and build up confidence and experience.

  60. Tavis Furbush

    Hey guys. My name is Tavis. I am a 7th grader and 13 years old. This year i decieded to take a robotics class that is called FLL ( First Lego Leauge ) i am a team of 1 and need help with programing my robot. my first compeatation is next weekend. i build the robot just not the programing. These instructions were confusing me. 8(. Could you make a youtube video and send me the link @ please.

    • Coleman Benson

      @Tavis Furbush Unfortuantely we cannot create such a video, though you might want to check YouTube for videos where people explain how to use the LEGO software.

  61. arvind

    Hello sir, I m a java programmer and I would like to learn robotics programming using java. So can u please suggest which book I have to reffered for java robotics programming.

  62. bhargav

    can i make humanoid robot ?
    and how can i make it
    can you make any website from it

    • Coleman Benson

      @bhargav At this time we do not have any tutorials or books explaining how to create a humanoid robot. A tutorial might be a good idea and we will consider it in the future.

  63. Tara B.W

    Aha thanks Coleman-!
    Ah yea, I can certainly start with a microcontroller and sensor based project then, thanks again ;P

  64. James Mikhail

    Hello Coleman,
    I read through everything, but if I combine everything, will i be able to make a robot with a claw??
    James Mikhail

    • Coleman Benson

      @James Mikhail Although we don’t talk much about adding a claw or robot arm in this tutorial series, adding a claw / gripper is as easy as controlling a servo motor.

  65. Eswar

    Hi Benson first of all thank you for sharing knowledge and I have planned a project on robotics and I know basic c language and assembly language but I would like to learn more about programming so suggest me some books

    • Coleman Benson

      @Eswar Books almost always relate to the specific programming language you want to learn. You might want to try some free online resources such as codeacademy to get an idea of which language(s) you want to learn more about. If you want to program for general robotics, you should try Arduino, C, Python (among others).

  66. USMAN

    how we read csv files in HTK and code it please guide me….. thanks alot

  67. James MIkhail

    Hello Coleman,
    I read your reply, but do I also use a servo motor??
    There is R/C Servo or Industrial motor. Which one?
    Do I use either one of those motors?
    James Mikhail

    • Coleman Benson

      @James MIkhail Most robot claws / grippers use RC servo motors because you can easily control the position.
      You would only consider an industrial servo if the gripper is very large or used on an industrial robot.

  68. sede quame

    Your posts were useful, and i want to ask is it possible to get the robotics kit shipped to u at any destination in the world?

  69. nabin

    hello sir, i wants to make a simple robotic arm with voice control. i have little idea about arduino so please give me a detail project idea step by step. i will be glad if you sent me. i am student of high school student. i am so interested on robotic. i am very lazzy student of my college so no 1 beleve me i have to proof i am a real talent student

  70. Yato

    sir what is the most programming Language used these days, and its the faster for robots to understand, and it includes all of the robots terms

    • Coleman Benson

      @Yato We have found one of the most popular programming languages in hobby robotics is Arduino. It is not the fastest or most efficient however, but it is very easy to learn and versatile.

  71. Aar

    Hi, If I’m not using any arduino type kit. Can I simply buy a microcontroller and continue….?? And how..

  72. Varun Raj V R

    Hello sir, I’am a mechanical engg. student and I am interested in robots used in military. I have learned c in classes(till files). I participated
    in robot coding event where they used winavr for coding but could you tell me the programming language used for military robots so that I can learn that specific language in detail. thank you.

    • Coleman Benson

      @Varun Raj V R There is no specific programming language used – it all depends on which microcontroller or system is used, though most land-based military robots are purely remote controlled with rugged RC systems (long-range transmitter / receiver with redundancy).

  73. jayesh

    awsm i need simple robot for my robotics compitition give me suggestions

  74. Ankit

    So interesting sir & I would like to have some more basic info about robo programs as a biggner

    • Coleman Benson

      @Ankit As a beginner, we suggest starting with Arduino. If you want to proceed more with programming as opposed to mechanical or electrical design, you can start with programs like C, .NET, Python or Java.

  75. Devansh

    Very helpful sir can u tell me your websites name so that i can build more robots

  76. Aaron

    I have read this blog about robotics and i’m very much intrigued. I’m planning to start off by making a simple Robotic Arm with 3 degrees of freedom (up-down, turning left-right, open-close of the claw) using a 8051 micro controller and write a code in Embedded C using Keil uVision. Can you please guide me pertaining to how I can code the arm in that platform and interface it?

    • Coleman Benson

      @Aaron Start by using RC servo motors and either a servo controller or a microcontroller. We can provide a list of parts if you contact us via the RobotShop Forum.

  77. john

    is it possible to make a robot or a machine with Raspberry Pi

  78. Too phat

    Can i have one simple coding c++ Oen GL for Humanoid…. like a static robot

  79. anup kumar

    sir i am interes techonology feild can u help me ??????????

    • Coleman Benson

      @anup kumar If you are interested in the field, you should either start to learn at home, or take courses which interest you. Not sure what you would like RobotShop to help with in particular, but at this time we do not provide training or courses.

  80. BRUH

    Is there a certain microcontroller you would used with the python language.

    • Coleman Benson

      @BRUH Pyton is generally compiled on a computer (Linux being one of the more popular). As such, you might consider a single board computer rather than a microcontroller. We are not aware of any microcontrollers which can run Python.

  81. Salvatore

    Hi, i am an university student of automation engineering. I really like to create some project with arduino but i feel like it is too easy and not used in robotic applications. I am looking for a programming language to start learn before the job world, i mean, what is the most used programming language nowadays for robots (like quadcopter, earth and water drones, humanoid robots, etc….)? And what is the most used control system? A microcontroller or a pc based system? I really like these things and i’d love to start to learn for making experience.
    I hope You can help me.

    • Coleman Benson

      @Salvatore It depends largely on the company you work at; before you start, you might learn C or Python to try to be “universal”.

  82. gaurav

    the best one is Lego mindstorm.
    It has made robotics like a toy for teenagers.

  83. kabir yahaya

    I really don’t understand anything from what I read,but I really enjoyed reading it… I really have a great passion in robotics,sir am really interested in robot programming, pls guide me on how to start

  84. aasir

    Sir how to give a voice to a robot and give him the knowledge of each and everything

    • Simon Latour

      @aasir There is a lot of knowledge involved in what you are looking for. You should do research on AI (Artificial Intelligence)

  85. Krish

    Are we to use specific Programming Languages for specific Microcontrollers, or will it be OK with any random one?

  86. unknown

    I want to create a humanoid fighting robot, 7cm tall, that could learn combos and have a imitation system, so he reproduces my moves; i also thought about voice control. Is that possible? If it is, how?

    • Coleman Benson

      @unknown That’s actually very advanced – some researchers use the Microsoft Kinetc, but have spent many months creating the code.

  87. idc

    could you use a animation suit to calculate the direct movements of the robot? it’s like what kinect does
    of course this would take more than months to create because movements have to be accurate.

  88. sudhagar

    Hi I am doing analysis for automotive robotics. I want to execute few samples in automotive robot. I have downloaded arduino-1.6.9 windows. I tried to execute Built in Examples “01. Basics –>AnalogReadSerial” I am able to compile but I am not able to see any output window. Please guide me how to see output.

    • Coleman Benson

      @sudhagar In the Arduino serial terminal, you need to choose the appropriate COM port and baud rate before the output will display.

  89. Aparna prabhune

    How to connect the motorcontroller to the computer? Please answer.

  90. Azzam

    Thanks for your valuable info, but is it possible to use iPad , iPhone or laptop as controllers for those robots?lets say from an app?

  91. Pande

    I want to operate my robot by smartphone. Just like drones can be control. How can I do that ?

    • Coleman Benson

      @Pande Using a smart phone’s Bluetooth is easiest to send signals wirelessly to a robot – you need a robot which has a Bluetooth connection.

  92. Aparna Prabhune

    Can I store the readings from the sensors to my pendrive on the microcontroller?

  93. zeshan

    How I able to use the thermal sensor on the basis of the thermal reaction

    • Coleman Benson

      @zeshan You mean a chemical reaction? a temperature sensor detects temperature, so, we’re not sure we understand your question?

    • Coleman Benson

      @Dick brain That’s a bit beyond the scope of this article – take a look online and we’re sure there are nice comparisons between the two (and others).

    • Coleman Benson

      @zeshan The question can be extended to “Why are there many kinds of ________”? It is rare that everyone on the planet comes together to work on only one thing.

  94. Joseph Adeabah

    I have always loved robot and want to make one for myself especially to start with arduino. But here in Ghana-Africa it is very difficult for me to aquire one and start my project even though I have all the books and the software on my pc but do not have the arduino kit. Can somebody help me to aquire one? +233542150637

  95. Brickon Kluonzee

    I want to build a prototype , so is it possible to build it in an autonomous way? If it is then where can I learn building it?

  96. XN

    Hello, I want to learn robotics, and I can’t go to university or robotics class since I’m only 12 yrs old. I can’t go to a camp since they won’t start until the summer, and I have school. Do you have any ideas on books or website I can use?

  97. sarfraz ahmad

    i want make a fire sensing/fighting robot and i dont have any idea about its programming. i need full code of its programming . help me as soon as possible.

    • Coleman Benson

      @sarfraz ahmad Unfortunately creating custom code for a custom robot is not something we are prepared to do. Normally that requires having the robot in person as well.

  98. Daryabi

    It’s really nice and. Also could u please suggest some books which is useful for artificial intelligence, cz I am going to do my degree, in computer since tq

  99. Rishikesh

    Which language is mostly used in robotics programmings or what role C++ having in it

    • Coleman Benson

      @Rishikesh It depends on if you are considering hobby robotics, professional, research or industrial. For hobby robotics, Arduino is a great start.

  100. Mostafa

    Hi … thank you very much … i worked with c and c++ before but i don’t know which language is good for robotic. please help me.

  101. Xendex Fatmin Victory David Jama

    i love this s#little study i had here
    i just wish to know more and more
    all thanks to you Mr. Coleman Benson
    but how can i know more of this????

  102. Ime inyang

    Can a ps2 game pad or TV remote b used as a remote control if properly connected to control the robot

  103. ASHISH


  104. BaleBoss

    Thanks for the guide. You mentioned in one of your earlier replies that one can read books to improve his knowledge. Can you suggest such type of books?

  105. Mohammad

    Useful!! I wanna study in university the way i can program any hardware and plug it into any machine or parts such as arms or wheels etc. and it will do what i wrote, What type of study is that?? is it software engineering or programming or computer engineering?? Thanks

  106. M.Rajkumar

    Sir,can u suggest any book to learn more deeply
    I want to make a robotic arm
    Please reply

  107. Ahsan

    hi sir i am ahsan i am new here i am a university student and my course is BSCS in computer engnering but i dont know about well c++ my intrest in electrical and mechanical field well an i know about c sharpe some sir i want to work on robotics please tech me how i doing start??

    • Coleman Benson

      @Ahsan You would need an idea of where you wanted to get started – mobile robotics / robot arm / general electronics etc. If you can create a new topic on the RobotShop Forum detailing what you are most interested in, as well as your budget, we would be happy to guide you to appropriate solutions.

  108. chijioke

    pls sir i know only how to build the mechanical aspect of a robot but do not know how to programm it.i have no knowledge of programming languages,the meaning of microcontroler and a servo.

  109. King Caleb

    Sir, can I make a robot with a sensor that can detect a human/ living thing? Can I use a thermal sensor? if so, will it not be expensive to buy one?

    • Coleman Benson

      @King Caleb Provided the “living thing” generates heat, you can use an infrared sensor / camera. A thermal camera is quite expensive.

  110. pihu pateriya

    Thanks for giving nice knowledge but please give the fully source code for robot program and also give complete discription by mechanically that how we makes robot without any help of any tutorial



  112. Kevin

    Sir, we have been using arduino and C programming for our 4 wheel robot. But our goal is to make an autonomous robot equipped with camera, GPS, and sonar sensor. All the data from sensors need to be integrated which requires complex mathematical calculations. Which programming language support such calculations in real time?

    • Coleman Benson

      @Kevin It depends on the level of complexity of the image you need to process. For example the CMUCam can process basic images and colors, but anything more complex needs a full PC. Most mobile PCs (single board computers) run Linux, so you’d need to find a program that is Python compatible. R.O.S. might be a good option.

    • Coleman Benson

      @abnet We’re here to help as best we can. If you have specific questions, we invite you to create a new topic on the RobotShop Forum.

  113. basil

    sir.. am still a student whose future is still at hand and am looking up to you as a role model.I have decided to make the best robot in the whole world. Am still a beginner in robot work,sir how can you help me

    • Coleman Benson

      @basil Welcome to robotics! You will need to figure out how best you want to learn – either formally (school) or “do it yourself” at home, or read books, follow instructions etc. If you have a bit of a budget, start with an Arduino kit. If you don’t have much money, start collecting broken electronics which use through-hole components and a soldering iron and desoldering pump. Choose courses in school which will help you towards an engineering degree (if possible) to leave doors open should you choose that path. If you only have a computer, there are many free programming languages you can download and learn – try codeacademy for example.

  114. ope

    What are the instructions given in the code
    Please send through email

    • Coleman Benson

      @ope We do not have general purpose sample code – the programming will depend on what parts you select and what you want it to do.

  115. Nandakishore

    iam a student in keralA.I LIKE TO INVENT MY own ROBOT.but the the total amount of it’s things very i dont know what to do

    • Coleman Benson

      @Nandakishore With a limited budget, you can try these appraocahes: learn to program (all you need is a computer), design in 3D (many free CAD software) or create circuits (Eagle / Fritzing). Build up a selection of parts which you find locally by disassembling broken products (take out the motors and create your own bin of motors, take out fans etc.). Invest in a soldering iron and solder.

  116. Dave Yochum (Magoo)

    I am building a 10 Ft diameter, 8 leg, walking spider. Each leg has 3 hydraulic cylinders with linear potentiometers. What kind of PC and programing software would you suggest?

  117. erwin madlangbayan

    are you making a book or a journal of programming robots?
    or parts to know at the book or journal

  118. ss robotics

    I want to make a robot that can clean my room and I want to put a thing that grip stuff plz help me sir what is that thing called?

    • Coleman Benson

      @ss robotics That’s quite a broad project “clean the room” – you’ll need to describe all of the tasks and then brainstorm how the robot will accomplish each task. Something to grip stuff would be a “gripper”.

  119. veer

    How to Make a Robot ALL Lesson are very-very good,
    all lesson are overview of basic of robotics excellent…

  120. Dhanush

    Which language is easy to use while we use pictorial scan and voice recognition in robots

    • Coleman Benson

      @Dhanush Not sure what you mean by “pictoral scan” – image recognition? If you’d like both voice and image recognition, you’re likely to have a full computer onboard running Python. or OpenCV.

  121. Santosh Rauniyar

    i’ll work at your topic it’s true but now i want to do work for our country and help people who are helpless now in my country at every
    corner crowded with beggar and there i’m not told about young beggar but only Child i want that anyone may suggest that what should be do i have also a idea but can’t afford. .

    • Coleman Benson

      @Santosh Rauniyar You don’t need money to have a positive impact on people’s lives. If they have trouble with food and housing, a robot will not be possible, so the best way to help would be to help them find work, help to train them, improve the politics, decrease corruption etc.

  122. Emma

    Hi Coleman, Great Lessons shared. They are very insightful n informative. God bless you. Best Regards.

Leave a Reply

  • (will not be published)