Unable to use full range of slide pot (MIDI)

Status
Not open for further replies.

LoggingLarry

New member
I'm working on a 3 fader midi box to control CC values. I've got the box working...mostly.
All three faders are 10k and 100mm, but I seem to read the maximum value when I'm about 65mm up the fader. I thought this was kind of strange and might be something to do with the library I'm using (https://github.com/joshnishikawa/MIDIcontroller) so I tried just running a basic analog read program and checking the serial monitor, the values swept from 1-1023, but it hit the top value at the same 65mm mark.

I've tried changing values and saving in the MIDIpot.h file.It seems to have zero effect when I recompile the code, even when changing values like "divider" and "outHi"

I'm getting pretty stumped at this point and unsure as to why my changes aren't having any effect, any help / direction would be greatly appreciated!


#include "MIDIcontroller.h"

byte MIDIchannel = 1;
const int potPin1 = A5; // Change this to the ANALOG pin you want to use
const int potPin2 = A3;
const int potPin3 = A1;

// Pot parameters are: pin, CC number, KILL switch enabled
// When KILL is enabled, separate CC messages (with a different number) will be sent
// when you turn the pot all the way down and when you start turning it up again.
// Simply omit the "KILL" argument if you don't want that.
MIDIpot myPot1(potPin1, 1, KILL);
MIDIpot myPot2(potPin2, 11, KILL);
MIDIpot myPot3(potPin3, 7, KILL);

// OPTIONAL: use outputRange() to limit the min/max MIDI output values
//myPot1.outputRange(50,90);

void setup(){
}

void loop(){
myPot1.send();
myPot2.send();
myPot3.send();



// This prevents crashes that happen when incoming usbMIDI is ignored.
while(usbMIDI.read()){}

// Also uncomment this if compiling for standard MIDI
// while(MIDI.read()){}
}
 
You have your faders connected to 5v, connect them to 3.3v and it should work as expected as long as none of the Teensy pins have been damaged by the 5v.
 
Status
Not open for further replies.
Back
Top