Project 7 Reading-out Analog Value

1.Introduction

On a KEYESTUDIO UNO control board , there are 6 analog interfaces numbered from 0 to 5. Potentiometer is a typical output component of analog value. We will use it in this project. We simply use graphical programming read out analog value of analog 0 on serial monitor.

2.Materials Required:

  1. KEYESTUDIO UNO Control Board *1

  2. V5 Sensor Shield*1

  3. Adjustable Potentiometer*1

  4. Female to Female Dupont Line*3

3.Connection Diagram:

4.Sample Code

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Serial.print("value:");
  Serial.print(analogRead(0));
  Serial.println();
  delay( 1000 );
}

5.Result

There are reading-out analog values as follow.