Posted on 38 Comments

How to Program an Arduino

Do you own Arduino and looking to program it as per your need? You have landed to the right article.

Here in this article, we will learn how to program the Arduino board. There are many types of Arduino available, but Arduino Uno is most common. So when you are planning to build something for your project, make sure you do a bit of research on the features and versions.

Step 1

The first step to start programming Arduino is to install the Arduino programmer, which is also known as IDE. You can install Arduino programmer on Windows, Linux or MAC machine

Step 2

Now go ahead and connect your Arduino board to the USB port of your PC. You might need to have a specific cable. Make sure you’ve reconfigured the serial-port address as every Arduino posses unique serial-port.

Step 3

Select the type of board and the serial in the Arduino programmer software.

Step 4

Before beginning with your hardcore coding, make sure you do a test using the preloaded programs that are called sketches. You will find these within the Arduino programmer software itself. To test it, just select the sketches and press the “Upload” button. You will find that the Arduino board has started responding to the code and if you have uploaded the program to blink LED light, it will start blinking.

Step 5

There are only two ways to upload the code to Arduino, one is by writing your code or you can copy and paste from anywhere else. Arduino sketch has five parts.

  1. Header: it describes the sketch and its author
  2. Section: that defines the variables
  3. Setup Routine: used to set up the Arduino so that you can run preliminary code
  4. Loop Routine: This is used when you upload code and execute it repeatedly until the sketch is stopped
  5. Other Section: This is the section that can be used to mention other functions that get activated during the setup loop routines

To upload the code, click on the “Upload” button and your Arduino board is ready to use. Now you can disconnect it from the PC and start using it in your project.

Here is a simple code to blink LED light

Posted on 12 Comments

Arduino: Control 2 Servo Motors with a Joystick

In this tutorial you will learn how to control 2 servo motors using a Joystick module with the help of Arduino. 

What can I do with this setup?

Great question! The first video shows a clever setup using a pan/tilt bracket kit which allows you to mount a sensor to it and control which direction it faces (submitted by a fan ????). The second example shows how you could use the motor setup in an RC car to control both steering and speed.

Materials

Here is a list of the materials we used for this project. It’s not important that you get these exact same items, you can switch out any of these parts with something you’re more comfortable using.

Circuit Diagram

Here’s a quick look at the circuit we’ll be building. If you’re comfortable with building electronics, you can use this as your guide. But don’t worry! If you’re not so sure or get stuck at any point, we have step by step instructions below.

~split~


Control Servo with Joystick

Control 2 Servo Motors with Arduino

Arduino Joystick Servo Control