// Raw potentiometer value viewer // Constants #include "WProgram.h" void setup(); void loop(); const int POT_PIN = 0; // Pot connected to analog pin 0 const int SERIAL_PORT_RATE = 9600; void setup() // Run once, when the sketch starts { Serial.begin(SERIAL_PORT_RATE); // Starts communication with the MIDI out port } void loop() // Run over and over again { int nValue = analogRead(POT_PIN); Serial.println(nValue); } int main(void) { init(); setup(); for (;;) loop(); return 0; }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)