pot.ino 267 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define  POT_PIN  0

char command;

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

void loop()
{
    if (Serial.available()) {
         command = Serial.read();
         if (command == 'p')
         {
             Serial.println(analogRead(POT_PIN));
         }
    }
}