Showing posts with label ARDUINO. Show all posts
Showing posts with label ARDUINO. Show all posts

Thursday, 16 March 2017

INTRO ABOUT ARDUINO

                                    Arduino

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.
Over the years Arduino has been the brain of thousands of projects, from everyday objects to complex scientific instruments. A worldwide community of makers - students, hobbyists, artists, programmers, and professionals - has gathered around this open-source platform, their contributions have added up to an incredible amount of accessible knowledge that can be of great help to novices and experts alike.
Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast prototyping, aimed at students without a background in electronics and programming. As soon as it reached a wider community, the Arduino board started changing to adapt to new needs and challenges, differentiating its offer from simple 8-bit boards to products for IoT applications, wearable, 3D printing, and embedded environments. All Arduino boards are completely open-source, empowering users to build them independently and eventually adapt them to their particular needs. Thesoftware, too, is open-source, and it is growing through the contributions of users worldwide.


Why Arduino?

Thanks to its simple and accessible user experience, Arduino has been used in thousands of different projects and applications. The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and Linux. Teachers and students use it to build low cost scientific instruments, to prove chemistry and physics principles, or to get started with programming and robotics. Designers and architects build interactive prototypes, musicians and artists use it for installations and to experiment with new musical instruments. Makers, of course, use it to build many of the projects exhibited at the Maker Faire, for example. Arduino is a key tool to learn new things. Anyone - children, hobbyists, artists, programmers - can start tinkering just following the step by step instructions of a kit, or sharing ideas online with other members of the Arduino community.

There are many other microcontrollers and microcontroller platforms available for physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others offer similar functionality. All of these tools take the messy details of microcontroller programming and wrap it up in an easy-to-use package. Arduino also simplifies the process of working with microcontrollers, but it offers some advantage for teachers, students, and interested amateurs over other systems:

·      Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms. The least expensive version of the Arduino module can be assembled by hand, and even the pre-assembled Arduino modules cost less than $50

·      Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems. Most microcontroller systems are limited to Windows.

·      Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well. For teachers, it's conveniently based on the Processing programming environment, so students learning to program in that environment will be familiar with how the Arduino IDE works.

·      Open source and extensible software - The Arduino software is published as open source tools, available for extension by experienced programmers. The language can be expanded through C++ libraries, and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on which it's based. Similarly, you can add AVR-C code directly into your Arduino programs if you want to.

·      Open source and extensible hardware - The plans of the Arduino boards are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it. Even relatively inexperienced users can build the breadboard version of the module in order to understand how it works and save money.


Arduino - Multiple Servo Control With Arduino

In this tutorial, we will learn how to use multi-servo with Arduino. We will control 4 servo motors with Arduino PWM outputs.
You can implement your robotic arm projects with reference to this tutorial. Of course we will use external battery / power when doing this. In the next tutorial, I'll show you how to use multiple servos with potentiometers.

Step 1: Hardware Required

- Arduino Board
- Servo Motor x4
- Battery
- Wires and Breadboard

Step 2: Connections

- The external battery VCC / GND connect to the breadboard.
- The Arduino GND connect to the breadboard's GND input
- The servo connections we use in this project are as follows;
Orange Input -Signal Input
Red Input -Power Input (VCC)
Brown Input -Ground Input(GND)
- The Servo1 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo1 Signal connect to the Arduino Digital PWM 3
- The Servo2 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo2 Signal connect to the Arduino Digital PWM 5
- The Servo3 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo3 Signal connect to the Arduino Digital PWM 6
- The Servo4 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo4 Signal connect to the Arduino Digital PWM 9
The potentiometer
Two outer pins are power (VCC) and ground (GND)
Middle pin is signal pin
- Potentiometer's one outer pin connect to the breadboard VCC input
- Potentiometer's other outer pin connect to the breadboard GND input
- Potentiometer's middle pin connect to the Arduino Analog 1 input
I did not share the code because it is short and it varies according to the number of servos.
You can write code by watching the tutorial. This is a better way to learn.
I will continue to share long and complex codes.

 

 

                       

LED BLINK TUTORIAL ARDUINO



The Arduino is a great platform for learning circuits and micro controller programming.  For those who don't have experience with circuits or micro controllers it can be hard to know where to start.  We'll set up the basics here so that you can get experimenting and learn how much fun can be had with circuits.

Step 1: Installing the Arduino Software

The first thing we'll need to do in order to get things moving is to install the Arduino IDE.  This software is where you'll write all of the code that will control the micro controller and the attached circuit components.  You can download the IDE at the official Arduino Download Page.  Once downloaded you'll need to unzip the folder into a convenient location.  Then run the Arduino.EXE file.  Once you've done that, you should see the above window.

Step 2: Write Your First Sketch

 


We'll want to open the example sketch that can get us started.  To do so click File -> Examples -> Basics -> BareMinimum.  This will open a new window with a small amount of code.  This code acts as the framework for our program.  The Setup method will be run a single time right as the micro controller is turned on.  You should place code in here that you want to run once to configure the Arduino and get it ready to run your program.

A common first project to do is to light an LED.  There are multiple ways to do this, but an easy way is this.  Connect an LED with its anode pin in pin 13 on the Arduino board and the cathode in the adjacent GND pin.  Now add the following code to the setup section of the sketch:

pinMode(13, OUTPUT);
digitalWrite(13, HIGH);

This will set the 13th pin to an output pin, and set it to a high (5 volt) voltage level.  With a high voltage on the anode and a low voltage on the cathode the LED will now light.  Note that it is best practice to put a resistor in-line with the LED to control the amount of current flowing through the LED to ensure that the LED does not burn out.  For this simple example we didn't do it, but keep in mind that you should do this on any real project.   

Step 3: Keep Going

Now that you've got the very basics down there's a great deal more to learn about circuits.  There are all sorts of tutorials online to help you build and learn how to create exciting things.