5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



ARDUBLOCK Project 7: Reading-out Analog Value

Posted by Fiona Su on

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.
Materials Required:

  • 1. KEYESTUDIO UNO Control Board *1
  • 2. V5 Sensor Shield*1
  • 3. Adjustable Potentiometer*1
  • 4. Female to Female Dupont Line*3

Connection Diagram:

thumb

thumb

After wiring, we can start programming.

thumb

 

Click “download to Arduino” to see the following codes in IDE interface:
Sample Code:

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

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

*******************************************************************************

Result:
There are reading-out analog values as follow.

thumb 

All Projects

Buy it >> ARDUBLOCK Graphical Programming Starter Kit for Arduino

0 comments

Leave a comment

Please note, comments must be approved before they are published