|
@ -65,11 +65,12 @@ void loop() { |
|
|
if (pots[0] < read - tolerance || pots[0] > read + tolerance) { |
|
|
if (pots[0] < read - tolerance || pots[0] > read + tolerance) { |
|
|
pots[0] = read; |
|
|
pots[0] = read; |
|
|
Serial.print("pot 0: "); |
|
|
Serial.print("pot 0: "); |
|
|
|
|
|
//print value between 0 & 127 like MIDI velocity ;)
|
|
|
Serial.print(pots[0]/8); |
|
|
Serial.print(pots[0]/8); |
|
|
Serial.println(); |
|
|
Serial.println(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//get Y1 of 4051
|
|
|
|
|
|
|
|
|
//get Y1 of 4051, analog to Y0
|
|
|
digitalWrite(s0, HIGH); |
|
|
digitalWrite(s0, HIGH); |
|
|
digitalWrite(s1, LOW); |
|
|
digitalWrite(s1, LOW); |
|
|
digitalWrite(s1, LOW); |
|
|
digitalWrite(s1, LOW); |
|
|