Posts

Arduino Tutorial - Data Types

Image
Arduino Tutorial Data Types TECH KNOWLEDGE MASTER, Data Types Data types in C refers to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in the storage and how the bit pattern stored is interpreted. The following table provides all the data types that you will use during Arduino programming. void Boolean char Unsigned char byte int Unsigned int word long Unsigned long short float double array String-char array String-object void The void keyword is used only in function declarations. It indicates that the function is expected to return no information to the function from which it was called. Example Void Loop ( ) { // rest of the code } Boolean A Boolean holds one of two values, true or false. Each Boolean variable occupies one byte of memory. Example boolean val = false ; // declaration of variable with type boolean and initialize it with false boolean state = true ; // declaration of vari

Arduino Tutorial Program Structure

Image
  Arduino Tutorial Program Structure TECH KNOWLEDGE MASTER, Program Structure I n this chapter, we will study in depth, the Arduino program structure and we will learn more new terminologies used in the Arduino world. The Arduino software is open-source. The source code for the Java environment is released under the GPL and the C/C++ microcontroller libraries are under the LGPL. Sketch  − The first new terminology is the Arduino program called “ sketch ”. Structure Arduino programs can be divided in three main parts:  Structure, Values (variables and constants), and  Functions . In this tutorial, we will learn about the Arduino software program, step by step, and how we can write the program without any syntax or compilation error. Let us start with the  Structure . Software structure consist of two main functions − ◆ Setup( ) function ◆ Loop( ) function Void setup ( ) { } PURPOSE   −  The   setup()   function is called when a sketch starts. Use it to initialize the variables, pin mod

Arduino Tutorial - Installation

Image
Arduino Tutorial Installation TECH KNOWLEDGE MASTER, Installation , After learning about the main parts of the Arduino UNO board, we are ready to learn how to set up the Arduino IDE. Once we learn this, we will be ready to upload our program on the Arduino board. In this section, we will learn in easy steps, how to set up the Arduino IDE on our computer and prepare the board to receive the program via USB cable. Step 1  − First you must have your Arduino board (you can choose your favorite board) and a USB cable. In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega 2560, or Diecimila, you will need a standard USB cable (A plug to B plug), the kind you would connect to a USB printer as shown in the following image. In case you use Arduino Nano, you will need an A to Mini-B cable instead as shown in the following image. Step 2 − Download Arduino IDE Software. You can get different versions of Arduino IDE from the  Download page  on the Arduino Official website. You must s

Arduino Tutorial - Board Description

Image
Arduino Tutorial Board Description TECH KNOWLEDGE MASTER, Board Description. In this chapter, we will learn about the different components on the Arduino board. We will study the Arduino UNO board because it is the most popular board in the Arduino board family. In addition, it is the best board to get started with electronics and coding. Some boards look a bit different from the one given below, but most Arduinos have majority of these components in common. 1 Power USB Arduino board can be powered by using the USB cable from your computer. All you need to do is connect the USB cable to the USB connection (1). 2 Power (Barrel Jack) Arduino boards can be powered directly from the AC mains power supply by connecting it to the Barrel Jack (2). 3 Voltage Regulator The function of the voltage regulator is to control the voltage given to the Arduino board and stabilize the DC voltages used by the processor and other elements. 4 Crystal Oscillator The crystal oscillator helps Arduino in deali

Arduino Tutorial - Overview

Image
Arduino Tutorial Overview TECH KNOWLEDGE MASTER, Overview Arduino is a prototype platform (open-source) based on an easy-to-use hardware and software. It consists of a circuit board, which can be programed (referred to as a microcontroller) and a ready-made software called Arduino IDE (Integrated Development Environment), which is used to write and upload the computer code to the physical board. The key features are : ◆ Arduino boards are able to read analog or digital input signals from different sensors and turn it into an output such as activating a motor, turning LED on/off, connect to the cloud and many other actions. ◆ You can control your board functions by sending a set of instructions to the microcontroller on the board via Arduino IDE (referred to as uploading software). ◆ Unlike most previous programmable circuit boards, Arduino does not need an extra piece of hardware (called a programmer) in order to load a new code onto the board. You can simply use a USB cable. ◆ Additio