Table of Contents

Analogread

About this Article

Abstract

How to do this,please refer to light led and how to connect cubieboard and arduino

400 400

Schematics

Source Code

int potPin = 0;
void setup()
{
Serial.begin(9600);
}
void loop()
{
int val;
int dat;
val=analogRead(0);
dat=(125*val)>>8;
Serial.print("Tep:");
Serial.print(dat);
Serial.println("C");
delay(500);
}

Headline

See Also