Arduino MIDI Control to Studio One with HUI Surface Comunication Issue

Hi Community and Folks...

I´m trying to build a Simple DAW MIXER Control with HUI Surface for( Volume Faders, Mute, Solo, Select, Record Buttons) and start first with one Potentiometer to understand the Programm Communication.
Search over one Month every Day by Google and Forums to solved my issue.
Finally hope to get here some help of my problem.

First Something about the Project....

Hardware: Arduino Uno, Breadbord, 1 x 10k Potentiometer and wires.
The setup:: 5v, GND, A0

Software: Arduino, Hairless, MidiMonitor, Studio One

The Sketch:

int val = 0; //initial pot values.
int lastVal = 0;
int potiVal = 0;

void setup()
Serial.begin(115200); // the speed of the midi port, the same as we will be using in the Hairless

void loop()
val = analogRead(A0); //
val = map(potiVal,0,1023,0,127);
if (val != lastVal)
MIDImessage(0xB0,0x20,val);} // 176 = CC command (channel 1 control change), 1 = Which Control, val = value read from Potentionmeter 1 NOTE THIS SAYS VAL not VA1 (lowercase of course)
lastVal = val;

delay(10); //h

void MIDImessage(byte command, byte data1, byte data2)

Everything works till the DAW Software Studio One!

By turning the Poti, it send Data to Studio One, it find the Mixer Channel 1 and the Volume of Channel 1 just turned from +9,7 till +10.

What i´m doing wrong??

i Hope get some help to solve it.
Thanks for any help.

You're trying to map potiVal which is always 0

And from what I remember of MIDI CC messages 32 (x20) is Bank Select. So I wouldn't expect it to affect the volume. CC7 is Channel Volume.


Take a look at my MIDI Controller library.
Use AnalogHiRes for the volume faders, and Digital for the buttons.
You can use the MCU constants as note numbers for your buttons.
Use HairlessMIDI_Interface as MIDI interface.


I tried to make my own midi controller by using MIDI.USB librery and had some problem with the serial plot.
did someone tried it and can help me?

had some problem with the serial plot.

I have absolutely no idea what that means.

And how is it related to this 3 year old thread?