Wednesday, October 20, 2010

read one analog input in Arduino

const int firstPin = A0; // sensor to control value on analog input 0


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

void loop()
{
Serial.print(analogRead(firstPin));
}

No comments:

Post a Comment