Hi following the post I finally got a solution!!!
I'm using the first code posting by Yan_g
#include <MIDI.h>
// Variables:
int cc = 0;
int AnalogValue = 0; // define variables for the controller data
int lastAnalogValue = 0; // define the "lastValue" variablesvoid setup() {
// launch MIDI
MIDI.begin(4);
}void loop() {
AnalogValue = analogRead(0);
// convert to a range from 0 to 127:
cc = AnalogValue/8;
// check if analog input has changed
if (lastAnalogValue != cc) {
MIDI.sendControlChange(16,cc,1);
// update lastAnalogValue variable
lastAnalogValue = cc;
} // endif
}
and I've just made a modify th circuit puttin a 220ohm resistor between MIDI din port pin4 to digital input 1 on my arduino 2009
I've tested a 10k , 100k and 1m pots and all works fine...