Let's Make Robots!

beginer in electronics needs to program

hi, im a twelve year old boy who is not an expert  AT ALL, but knows the basics

i've made bristlebots, speaker tones, dc motor cars  and other stuff


when i have to program  in arduino UNO i just copy other codes from other people

cause...  I dont know how to program at all!!!! i think arduino's language is c,and i don't know  how to program


anybody knows how to program arduino

and can give me a little tutorial about key words and etcetera like setup, delay, control of dc motors sensor etc...

please help

Comment viewing options


In addition to the good advice you've gotten here, check out the Programming section of this FAQ.

so it seems i am aiming too high by choosing arduino for a beginner like me... ok

thanks for the advice!!!

i'll start looking for PIC then...



I am of 16 and I am also a starter in programming microcontroller. I've started with arduino. I think you can also get started with it if you are really determined.

For the tutorial part, i would just tell a few things now. Let's look at this sketch(arduino program):

//Blinking Led (1 second ON, 1 second OFF)

#define led 13 //led connected to digital pin 13

void setup()
  pinMode (led,OUTPUT); //led(digital pin 13) is set as output

void loop()
  digitalWrite(led,HIGH); //led turns on
  delay(1000); //waits for 1 second
  digitalWrite(led,LOW); //turns the led off
  delay(1000); //waits for 1 second



the first line starting with'//' is a comment. In a comment you can type anything. Its basic purpose is future reference. Comments can also be started with /* and ended with */ if they are of more than 1 line.

'#define' is a sort of find and replace. '#define led 13' means replace led with 13. The code understands 13 as 'Digital Pin No:13'. NOTE: U could directly use "13" in place of led in the commands if don't use #define led 13. #define is the only command which does not end with semi-colon( ;).

void setup() includes a set of commands which are executed only once at the beginning.

pinMode(led, OUTPUT); means that the led is an output unit.

void loop() includes a set of commands which run again and again.

digitalWrite(led, HIGH); means that the led is to be turned ON.

delay(1000); means that the arduino should not do anything for the next 1000 milliseconds(1 second).

digitalWrite(led, LOW); means that the led is to be turned OFF.

The brackets { } are used to enclose a set of commands. At present, I am also havig certain doubts regarding their use.

NOTE: The commands are case sensitive. Eg. digitalwrite won't work in place of digitalWrite

To construct the circuit for this programme, You actually don't have to connect anything to the arduino as most arduino boards already have an led connected to the pin no: 13.



...actually, height doesn't exist. All you need is practice to master a language. If you start out with basic, it'll be easier for you to understand than C. It has less strict syntax (aka grammer) and is more human readable. Hence it'll be easier for you to start. However, if you want to start with C, you need a lot more practice and time to understand it. There are loads of tutorials out there to help you (as Antonio pointed out above).

My only earlier point is that BASIC was meant for beginners. There is no reason you can't pick up arduino's version of C++. I believe you should attempt a number of different tutorials before you give up on arduinos right now.

You could also try ArduBlock. This could jumpstart your programming skills. You can stick to Arduino and learn to solve problems with software - but not bother about programming language complexity. http://letsmakerobots.com/node/29716
For anyone who is a noob, it is highly recommended that you start with BASIC, learn the concepts of programming (the concepts remain the same even if the keywords change) and then switch over to C/C++ when you feel you have enough time and resources (arduino board and a free weekend are all you need). However, if you want to start with Arduino C/C++ here is the best reference you'll ever find- http://arduino.cc/en/Reference/HomePage

I didn't start with BASIC, but I have used it and I think it teaches bad programming practices and severely limits the programmer's horizons about what's possible to do with software.

With the millions of tutorials on arduino (about 4,490,000 results on google) and milions of tutorials on C, I'd say any normal person should be able to start programming in under a week, you just have to be patient.

...and I myself started out with C++ and have never entered the basic domain but for anyone who doesn't speak programming languages (meaning intended), its good to start with basic as its closer to English than C/C++/Arduino is. Its the first reason why HLL was created in the first place- so that the language is closer to English than it is to machine code. You can implement the same code you type in C or basic in binary/machine code/assembly and generally, it'll be a bit faster but it'll be less easy to read and understand for humans.