You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
393 B

int analogPin = A0; //setaroume tin analogiki porta A0 tou arduino
int meas = 0;
void setup() {
Serial.begin(9600); // setup serial
}
void loop()
{
meas = analogRead(analogPin); // read the input pin
if (Serial.available())
{
if (Serial.read() == '1')
{
Serial.println(meas); // debug value
}
}
}