Difference between revisions of "Arduino"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 14: Line 14:
  
  
  '''Please ensure that you have the Arduino hardware kit ready with you before you begin to learn from this tutorial series. The list of components is as follows:'''
+
'''Please ensure that you have the Arduino hardware kit ready with you before you begin to learn from this tutorial series. The list of components is as follows:'''
 
   1. Arduino UNO board (1 no.)
 
   1. Arduino UNO board (1 no.)
 
   2. USB Power Cable (1 no.)
 
   2. USB Power Cable (1 no.)

Revision as of 17:48, 15 November 2019

Arduino is an open source platform used for building electronics projects. Arduino consists of both a physical programmable circuit board or microcontroller and a software, IDE (Integrated Development Environment) that runs on the computer. It is used to write and upload computer code to the physical board.

Arduino board designs use a variety of microprocessors and controllers. The boards are equipped with sets of digital and analog input/output pins, USB connection which is used for loading programs from computers, power jack, reset button etc.

A program written with the IDE for Arduino is called a sketch. The Arduino IDE supports the languages C and C++ using special rules of code structuring. It consists of only two functions, setup and loop. The setup function is used to initialize variables, input and output pin modes and other libraries needed in the sketch. After setup has been called, function loop is executed repeatedly in the main program. It controls the board until the board is powered off or reset.

Arduino can interact with buttons, LEDs, motors, speakers, cameras, TV and smart phones etc. It can used for almost any electronics projects.

The Spoken Tutorial effort for Arduino has been contributed by Nirmala Venkat and Manivel from Spoken Tutorials team and Abhinav Dronamraju and Brijesh Gupta from FOSSEE team.

The domain review of basic level is done by Srikant Patnaik from FOSSEE. The content for Intermediate level is contributed by Prof. Sharma from IIT Hyderabad.

Learners: High School and UG/PG Electronics students, hardware professional.


Please ensure that you have the Arduino hardware kit ready with you before you begin to learn from this tutorial series. The list of components is as follows:
 1. Arduino UNO board (1 no.)
 2. USB Power Cable (1 no.)
 3. Resistor >220 ohm (4 nos.)
 4. Breadboard (1 no.)
 5. Tricolor LED (1 no.)
 6. Seven segment display - Common cathode (1 no.)
 7. Seven segment display - Common anode (1 no.)
 8. Decoder – 7447 IC (1 no.)
 9. LCD 16 X 2 soldered with pin header (1 no.)
10. Jumper wires (20 nos.)
11. Potentiometer (1 no.)

Following components are required only for soldering purpose. Hence one unit per lab should be sufficient.

1. Soldering iron (1 no.)
2. Soldering stand (1 no.)
3. Soldering lead (1 no.)
4. Soldering paste (1 no.)


Basic Level

  1. Overview of Arduino
    • Learning objectives of Arduino
    • Prerequisites for learning Basic level Arduino tutorials
    • Prerequisites for learning Intermediate level Arduino tutorials
    • Who can use Arduino?
    • Glimpse of Spoken Tutorials available on Arduino series
  2. Electronic components and connections
    • Breadboard and its internal connections
    • LED and its connections
    • Tri-color LED
    • Resistor
    • Simple circuit using LED, resistor and breadboard
    • Common mistakes when using breadboard to make connections
    • Pushbutton and its connections
    • Common mistakes when using pushbutton to make connections
    • Seven segment display and its connections
    • Demonstration of all the above components
  3. Introduction to Arduino
    • About Arduino device
    • Features of Arduino
    • Components of Arduino board
    • Description of Microcontrollers
    • Few examples where a Microcontroller is used
    • Installation of Arduino IDE on Ubuntu Linux OS
    • Run the arduino executable file
    • The Arduino IDE window
  4. Arduino components and IDE
    • Set up a physical connection between Arduino and a computer
    • Connect the Arduino board to the computer using the USB cable
    • Various components available in Arduino hardware
      • ATMEGA 328 microcontroller chip
      • About Arduino BootLoader
      • Digital Pins
      • Analog Pins
      • Blinking LEDs that are helpful for troubleshooting
      • Ground Pins
      • External power adapter
    • Arduino programming language
  5. First Arduino Program
    • Write an Arduino program to blink an LED
    • Arduino program is saved as Sketch
    • Default program environment with two empty functions -
      • setup - function for setting up a micro-controller
      • loop - infinite loop
    • Program to turn on the LED
    • Compile the program into binary format
    • Program to turn off the LED
  6. Arduino with Tricolor LED and Push button
    • Tricolor LED - Common Cathode Tricolor LED
    • Other external devices that are required for this experiment
    • Understand the connection circuit details
    • Connect a tricolor LED to Arduino board
    • Write a program to blink tricolor LED
    • Use Pushbutton to control the blinking
    • How to reduce the delay of the blink
  7. Arduino with LCD
    • Connect an LCD to Arduino board
    • See the details of the circuit connection
    • See how to do the soldering
    • Setup the components as per the circuit diagram
    • The aim is to write two strings on the LCD display
    • Write a program to display a text message on the LCD
  8. Display counter using Arduino
    • Connect an LCD and a Push button to Arduino board.
    • Add a pushbutton and make a simple counter
    • Write a program in the Arduino IDE
    • See that pushbutton is working successfully
    • Modify the program to set a counter
    • Output: count is increased whenever the button is pressed
  9. Seven Segment Display
    • Connect a seven segment display to Arduino board
    • Types of seven segment display
    • Connection details of common cathode seven segment display
    • Connection details of common anode seven segment display
    • Circuit connection explanation
    • Live setup of the connection
    • Program to blink LEDs in seven segment display
    • High and low state of LED's in the seven segment
    • Program to display digits 0 to 4 in seven segment display
    • Compile and upload the program

Intermediate Level

  1. Assembly programming through Arduino
    • Write an assembly program to display a digit on seven segment display
    • Arduino - Assembly code reference
    • Arduino ATmega328 Pin mapping
    • Connection circuit details
    • Installing AVRA and AVRDUDE assembler
    • How to connect and check the port number of Arduino
    • Assembly program to glow the dot LED on the seven segment display
    • Assembly program to display digit two on the seven segment display
    • Assembly program to display digit five on the seven segment display using decoder
    • How to save the file, assemble and upload to the Arduino
  2. Digital Logic Design with Arduino
    • Write an assembly to verify the logical AND operation
    • Use the m328Pdef.inc file that is available in the code files link of this tutorial.
    • Explanation of the Source code for logical AND operation
    • Save the file and generate the.hex file
    • Upload the code to the Arduino
    • Displaying the output on the Seven segment display
    • Replace the program with or to perform logical OR operation
    • Replace the program with xor to perform logical XOR operation
    • Implement and verify the below combinational logics:
      • A = W′
      • B = WX′Z′ + W′X
      • C = WXY′ + X′Y + W′Y
      • D = WXY + W′Z
  3. AVR-GCC programming through Arduino
    • Write an assembly program to display a digit on seven segment display
    • Arduino - Assembly code reference
    • Arduino ATmega328 Pin mapping
    • Connection circuit details
    • Installing AVRA and AVRDUDE assembler
    • How to connect and check the port number of Arduino
    • Assembly program to glow the dot LED on the seven segment display
    • Assembly program to display digit two on the seven segment display
    • Assembly program to display digit five on the seven segment display using decoder
    • How to save the file, assemble and upload to the Arduino
  4. Interfacing LCD through AVR-GCC programming
    • Interface a LCD to Arduino board
    • Pin connections details of the Arduino and LCD
    • Image showing the connections
    • Live set up of the connections
    • Write an AVR-GCC program to display a digit on LCD
    • Using avr/io.h, util/delay.h, stdlib.h libraries in the program
    • Using ClearBit() and SetBit() function
    • Various functions used to excute the output
    • Using make FNAME command to compile and upload to Arduino
    • Displaying the output digit 5 on the LCD
  5. Mixing Assembly and C programming
    • Combining Assembly and C programming
    • Explanation of the circuit connections
    • Live setup of the connection
    • Assembly routine program which initialises and sets pin 13 of Arduino as output
    • Call that Assembly routine in AVR-GCC program to blink the Dot LED of the Seven Segment display
    • Use the Makefile that is available in the code files link of this tutorial.
    • Explanation of the Source code of the subroutine and main program
    • Save the file and generate the .hex file
    • Upload the code to the Arduino
    • Display the output on the Seven segment display

Contributors and Content Editors

Nancyvarkey, Nirmala Venkat, PoojaMoolya