View difference between Paste ID: cyRTr4Eb and p7t3MFeQ
SHOW: | | - or go back to the newest paste.
1-
// Include the Control Surface library
1+
void setup()
2-
#include <Control_Surface.h>        
2+
3-
USBMIDI_Interface midi;
3+
  Serial.begin(115200);
4
}
5-
//HairlessMIDI_Interface  midi;
5+
6
7-
 
7+
uint16_t oldAnalog;
8-
// logarithmic correction table
8+
void loop()
9-
const PROGMEM uint8_t lookUpTable[513] = {
9+
10-
    0, 1, 1, 2, 3, 3, 4, 4, 5, 6,
10+
  uint16_t analog = analogRead(A7);
11-
    6, 7, 8, 8, 9, 9, 10, 11, 11, 12,
11+
12-
    12, 13, 14, 14, 15, 15, 16, 17, 17, 18,
12+
  if(analog != oldAnalog){
13-
    18, 19, 19, 20, 21, 21, 22, 22, 23, 23,
13+
    oldAnalog = analog;
14-
    24, 25, 25, 26, 26, 27, 27, 28, 28, 29,
14+
    Serial.println(analog);
15-
    29, 30, 31, 31, 32, 32, 33, 33, 34, 34,
15+
16-
    35, 35, 36, 36, 37, 37, 38, 38, 39, 39,
16+
17-
    40, 40, 41, 41, 42, 42, 43, 43, 44, 44,
17+