I have the same problem as yours, although you may replace the last line into the if statement ~
for(int loope = 0;loope < 4; loope++){
readadc[loope] = analogRead(loope)/8; //reads value from pot
if(readadc[loope] != readadctemp[loope]){
MIDI_TX(176,loope,readadc[loope]); //sends cc
readadctemp[loope] = readadc[loope]; //old value
}
So it won't update the old value after you changed the pot, it might also speed up your code abit.
Although I think this problem exist since the ADC cant decide on what value it wants to be, for as example
2.5v = 511
2.51v = 512
due 10 bit resolution?
(Im using more inputs using a for loop for that, you can leave that away if you only using one.)
Also, not trying to hijacking your topic... but do you experience glitches when sending cc or notes to your midi device?
It appears at mines that theres alot of garbage sended along with the CC messages, such as "System reset" (FF) random notes. or random hex stuff ~.
This by using MIDI OX on a windows PC and a usb midi cable. (brandless) The cable works fine on normal midi devices, except the arduino.
(Sorry if my english grammar is crappy ^_)
Thanks.
Dnstje.