• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Build Electronic Circuits

Build Electronic Circuits

Electronics explained in a simple way

  • Start Learning
    • Basic Electronics
    • Digital Electronics
    • Circuits
    • Practical Skills
      • Printed Circuit Boards
    • Microcontrollers
      • Arduino
    • Maker Lifestyle
      • Podcast
  • About Me
  • Blog
  • Products
  • Contact
You are here: Home / Microcontrollers / Arduino / Arduino Programming

Arduino Programming

August 29, 2013 By Øyvind Nydal Dahl 8 Comments

If you haven’t started Arduino programming yet, it’s about time. The Arduino is a microcontroller board originally made for Interaction Design students in Italy. It was specifically developed to make it easy to start programming microcontrollers – even if you have no technical background.

Arduino microcontroller board

It’s an extremely useful tool. Both for beginners and more advanced circuit builders. It makes it simple to build really cool projects like your own remote control.

Arduino programming is done in three simple steps:

  1. Write your Arduino code
  2. Compile/verify your Arduino code
  3. Upload the code to your board

It is similar to microcontroller programming, but much simpler since it’s all done through the Arduino IDE.

Write Arduino Programming Code

Start by writing your Arduino code. You can either write something from scratch, find complete code or modify existing code. Copy this code into the Arduino IDE.

Here is a simple blink led code that you can start with if you want to start with something simple:


/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

You can find lots of code examples for Arduino programming on the Arduino website if you want to make something more advanced.

Compile Your Code

The next step is to compile your code. You do this from the Arduino IDE. If you used the code above, it should look something like this:

arduino-ide

To compile your code click the “Verify” button on the toolbar.

If everything goes smoothly, you should see something like this:

Arduino Programming Verified

Upload Your Compiled Code To Your Arduino Board

Now that you have compiled your code, all you need to do is to upload it to your board.

Make sure:

  • your board is plugged in
  • you have selected the right port from the “Tools->Serial Port” menu
  • you have selected the correct board model from the “Tools->Board” menu

Now, click the “Upload” button.

The Arduino programming is complete =)

Your compiled code is uploaded to your board and should start running immediately. If you used the code example from above you should see your LED blinking.

Get Started

Now you know the basics. And it’s time to start building. Get yourself an Arduino board and start experimenting. The official Arduino Starter Kit is a great kit to get started:

Click here to get the official Arduino Starter Kit

Filed Under: Arduino

Reader Interactions

Comments


  1. Varshith Gowda says

    April 26, 2015

    how to connect arduino board to the PC??
    How to write a program to do different tasks at different voltage inputs? or to use as a voltage regulator switch?

    Reply

  2. Kevin says

    August 27, 2015

    I’m trying to get a NEC chip programmed to replaced in my faulty car indash DVD player, the only fault is teh microprocessor is pulsing on one side, i found the same chip replacement but also found out that once it was put it would not work unless it was “Flashed” then inserted onto the pcb again, Is there a way to copy the info from the old microprocessor to the new replacement? Note: the unit has since being discontinued and the only thing i could get from the manufacturer was the schematics of the unit in a number of files detailing diagrams and schematics galore. I hope you have a positive reply or could point me in the right direction .

    regards
    Kevin Naidoo ~ RSA

    Reply

    • admin says

      September 7, 2015

      Hey Kevin,

      I have never used a NEC chip, so I don’t know. But I’m guessing it’s going to be hard to get the program out from the chip.

      Best,
      Oyvind

      Reply

  3. Abel says

    May 21, 2016

    Do you have a well explained tutorial video for arduino programing?

    Reply

    • admin says

      May 25, 2016

      I have an Arduino course on my membership site http://ohmify.com/

      Best,
      Oyvind

      Reply

  4. Hannah says

    November 17, 2020

    What coding language does Arduino use?

    Reply

    • admin says

      November 17, 2020

      It’s c/c++

      Reply

Trackbacks

  1. Jumpstart: Your DIY Electronics Quick Start Guide says:
    August 7, 2015 at 5:00 am

    […] Build Electronic Circuits also have a great introduction to Arduino programming. […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Search:

Footer

Topics

  • Basic Electronics
  • Digital Electronics
  • Circuits
  • Practical Skills
  • Microcontrollers
  • Maker Lifestyle
  • Newsletter Archive

Social:

  • Facebook
  • Twitter
  • YouTube

Copyright © 2021 · Ohmify AS · Terms and Conditions · Privacy Policy