WEEK 5

ARDUINO TRAINING CLASS

Learning program:


1. Learned basic AnalogReadSerial 
2. Learned basic Blink

1. Analog Read Serial

This example shows you how to read analog input from the physical world using a potentiometer. A potentiometer is a simple mechanical device that provides a varying amount of resistance when its shaft is turned. By passing voltage through a potentiometer and into an analog input on your board, it is possible to measure the amount of resistance produced by a potentiometer (or pot for short) as an analog value. In this example you will monitor the state of your potentiometer after establishing serial communication between your Arduino and your computer running the Arduino Software (IDE).

Hardware Required

  • Arduino Board
  • 10k ohm Potentiometer

Circuit

Connect the three wires from the potentiometer to your board. The first goes from one of the outer pins of the potentiometer to ground . The second goes from the other outer pin of the potentiometer to 5 volts. The third goes from the middle pin of the potentiometer to the analog pin A0.

Connection circuit


Resulted for analog read signal with full scale potentiometer


Resulted for analog read signal with lowest scale potentiometer




2. Blink

This example shows the simplest thing you can do with an Arduino or Genuino to see physical output: it blinks the on-board LED.


Hardware Required

  • Arduino or Genuino Board

optional

  • LED
  • 220 ohm resistor


Circuit


This example uses the built-in LED that most Arduino boards have. This LED is connected to a digital pin and its number may vary from board type to board type. To make your life easier, we have a constant that is specified in every board descriptor file. This constant is LED_BUILTIN and allows you to control the built-in LED easily. Here is the correspondence between the constant and the digital pin.

D13 - UNO

Connection circuit blink successful


Sketch code blink circuit



   

2 comments: