Arduino Circuit & Applications - SKengineers

 

ARDUINO CIRCUIT -

Arduino is an open-source hardware and software company, project, and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices. Its hardware products are licensed under a CC-BY-SA license, while software is licensed under the GNU Lesser General Public License (LGPL) or the GNU General Public License (GPL), permitting the manufacture of Arduino boards and software distribution by anyone. Arduino boards are available commercially from the official website or through authorized distributors.

Arduino board designs use a variety of microprocessors and controllers. The boards are equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion boards ('shields') or breadboards (for prototyping) and other circuits. The boards feature serial communications interfaces, including Universal Serial Bus (USB) on some models, which are also used for loading programs. The microcontrollers can be programmed using the C and C++ programming languages, using a standard API which is also known as the Arduino language, originated from the Processing language. In addition to using traditional compiler toolchains, the Arduino project provides an integrated development environment (IDE) and a command line tool developed in Go.

The Arduino project began in 2005 as a tool for students at the Interaction Design Institute Ivrea, Italy, aiming to provide a low-cost and easy way for novices and professionals to create devices that interact with their environment using sensors and actuators. Common examples of such devices intended for beginner hobbyists include simple robots, thermostats and motion detectors.

The name Arduino comes from a bar in Ivrea, Italy, where some of the founders of the project used to meet. The bar was named after Arduino of Ivrea, who was the margrave of the March of Ivrea and King of Italy from 1002 to 1014.

Software -

Arduino Software IDE

Arduino IDE - Blink.png

Screenshot of Arduino IDE showing Blink program

Developer(s)   Arduino Software

Stable release

1.8.16 / 6 September 2021; 2 months ago

Written in        Java, C, C++

Operating system   Windows, macOS, Linux

Platform  IA-32, x86-64, ARM

Type         Integrated development environment

License    LGPL or GPL license

A program for Arduino hardware may be written in any programming language with compilers that produce binary machine code for the target processor. Atmel provides a development environment for their 8-bit AVR and 32-bit ARM Cortex-M based microcontrollers: AVR Studio (older) and Atmel Studio (newer).

IDE -

It has been suggested that Arduino IDE be merged into this section. (Discuss) Proposed since November 2021.

The Arduino integrated development environment (IDE) is a cross-platform application (for Windows, macOS, and Linux) that is written in the Java programming language. It originated from the IDE for the languages Processing and Wiring. It includes a code editor with features such as text cutting and pasting, searching and replacing text, automatic indenting, brace matching, and syntax highlighting, and provides simple one-click mechanisms to compile and upload programs to an Arduino board. It also contains a message area, a text console, a toolbar with buttons for common functions and a hierarchy of operation menus. The source code for the IDE is released under the GNU General Public License, version 2.

The Arduino IDE supports the languages C and C++ using special rules of code structuring. The Arduino IDE supplies a software library from the Wiring project, which provides many common input and output procedures. User-written code only requires two basic functions, for starting the sketch and the main program loop, that are compiled and linked with a program stub main() into an executable cyclic executive program with the GNU toolchain, also included with the IDE distribution. The Arduino IDE employs the program avrdude to convert the executable code into a text file in hexadecimal encoding that is loaded into the Arduino board by a loader program in the board's firmware.

IDE 2.0 -

On October 18, 2019, Arduino Pro IDE (alpha preview) was released. Later, on March 1, 2021, the beta preview was released, renamed IDE 2.0. The system still uses Arduino CLI (Command Line Interface), but improvements include a more professional development environment, autocompletion support, and Git integration. The application frontend is based on the Eclipse Theia Open Source IDE. The main features available in the new release are -

Modern, fully featured development environment

Dual Mode, Classic Mode (identical to the Classic Arduino IDE) and Pro Mode (File System view)

New Board Manager

New Library Manager

Board List

Basic Auto-Completion (Arm targets only)

Git Integration

Serial Monitor

Dark Mode

Sketch -

A sketch is a program written with the Arduino IDE.[65] Sketches are saved on the development computer as text files with the file extension .ino. Arduino Software (IDE) pre-1.0 saved sketches with the extension .pde.

A minimal Arduino C/C++ program consists of only two functions -

setup(): This function is called once when a sketch starts after power-up or reset. It is used to initialize variables, input and output pin modes, and other libraries needed in the sketch. It is analogous to the function main().

loop(): After setup() function exits (ends), the loop() function is executed repeatedly in the main program. It controls the board until the board is powered off or is reset. It is analogous to the function while(1).

Blink example -

Power LED and Integrated LED on Arduino Compatible Board

Power LED (red) and User LED (green) attached to pin 13 on an Arduino compatible board

Most Arduino boards contain a light-emitting diode (LED) and a current limiting resistor connected between pin 13 and ground, which is a convenient feature for many tests and program functions.[69] A typical program used by beginners, akin to Hello, World!, is "blink", which repeatedly blinks the on-board LED integrated into the Arduino board. This program uses the functions pinMode(), digitalWrite(), and delay(), which are provided by the internal libraries included in the IDE environment. This program is usually loaded into a new Arduino board by the manufacturer.

# define LED_PIN 13                  // Pin number attached to LED.

void setup() {

    pinMode(LED_PIN, OUTPUT);       // Configure pin 13 to be a digital output.

}

void loop() {

    digitalWrite(LED_PIN, HIGH);    // Turn on the LED.

    delay(1000);                    // Wait 1 second (1000 milliseconds).

    digitalWrite(LED_PIN, LOW);     // Turn off the LED.

    delay(1000);                    // Wait 1 second.

}

Libraries -

The open-source nature of the Arduino project has facilitated the publication of many free software libraries that other developers use to augment their projects.

Operating systems/threading -

There is a Xinu OS port for the atmega328p (Arduino Uno and others with the same chip), which includes most of the basic features. The source code of this version is freely available.

There is also a threading tool, named Protothreads. Protothreads are described as "... extremely lightweight stackless threads designed for severely memory constrained systems, such as small embedded systems or wireless sensor network nodes. Protothreads provide linear code execution for event-driven systems implemented in C. Protothreads can be used with or without an underlying operating system.

Proto-threading utilizes C switch() statement in a non-obvious way that is similar to Duff's device.

Applications -

Arduboy, a handheld game console based on Arduino.

Arduinome, a MIDI controller device that mimics the Monome.

Ardupilot, drone software and hardware.

ArduSat, a cubesat based on Arduino.

C-STEM Studio, a platform for hands-on integrated learning of computing, science, technology, engineering, and mathematics (C-STEM) with robotics.

Data loggers for scientific research.

OBDuino, a trip computer that uses the on-board diagnostics interface found in most modern cars.

OpenEVSE an open-source electric vehicle charger.

XOD, a visual programming language for Arduino.

Tinkercad, an analog and digital simulator supporting Arduino Simulation.

Comments

Popular posts from this blog

Working Of Telescopic Shock Absorber (Automobile) - SKengineers

Cutting Tool Nomenclature - SKengineers

What Is A Liner In Automobiles? - SKengineers