Skip to content

Instantly share code, notes, and snippets.

@tagliati
Created December 9, 2012 18:32

Revisions

  1. tagliati created this gist Dec 9, 2012.
    20 changes: 20 additions & 0 deletions gistfile1.ino
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    const int analogInPin = A0; // Analog input pin that the potentiometer is attached to

    int sensorValue = 0; // value read from the pot

    void setup() {
    // initialize serial communications at 9600 bps:
    Serial.begin(9600);
    }


    void loop() {

    sensorValue = analogRead(analogInPin);

    Serial.print("sensor = " );
    Serial.print(sensorValue);
    Serial.print("\t\n");

    delay(1000);
    }