Wednesday, 8 March 2023

Basic Electronics lesson 9 Arduino


Learn arduino step by step

Arduino Tutorial

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.

Arduino provides a standard form factor that breaks the functions of the micro-controller into a more accessible package.

Audience

This tutorial is intended for enthusiastic students or hobbyists. With Arduino, one can get to know the basics of micro-controllers and sensors very quickly and can start building prototype with very little investment.

This tutorial is intended to make you comfortable in getting started with Arduino and its various functions.

Prerequisites

Before you start proceeding with this tutorial, we assume that you are already familiar with the basics of C and C++. If you are not well aware of these concepts, then we will suggest you go through our short tutorials on C and C++. A basic understanding of microcontrollers and electronics is also expected. 

You will need

- A Windows PC with Internet connection

- An Arduino Uno microcontroller or a compatible clone

- A USB male A to male B cable

- A DC Power supply for Arduino

- 9V DC battery, 9V Battery Connector, and 2.1 mm DC barrel jack adapter (male)

- A USB Power Supply

Arduino models

Below is a video for you to have an idea of an arduino board

Arduino models click for more

Below is a video for you to have an idea of an arduino ide installation

Arduino ide

We familiarized ourselves with the Arduino Uno board and the

Programming environment. We also set up the Arduino IDE for programming the board.


// the setup function runs once when you press reset or power the

board

void setup() {

// initialize digital pin LED_BUILTIN as an output.

pinMode(LED_BUILTIN, OUTPUT);

}

// the loop function runs over and over again forever

void loop() {

digitalWrite(LED_BUILTIN, HIGH);// turn the LED on (HIGH is

the voltage level)

delay(1000); // wait for a second

digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making

the voltage LOW

delay(1000); // wait for a second

}