Problem with sending MIDI CC messages

"Nantonos" Thank you for your reply's i admit some of these functions and codes confuse me, but ive never touched c code before this im using what i know from HTML Perl and PHP,and with those I know enough to get some things worcking and change variables configs etc, I can usually figure out a proublem or get evrything to talk to each other like MYSQL ect. , except HTML i know most of that,but, I must admit in your first quote on the write() Function in relation to the 3 lines you cited.
I do not understand what you mean. maybe a little more info or an example?
In fact im not even sure at all what this top line is about.

byte AnalogValue[6] = {0,0,0,0,0,0}; // define variables for the controller data

this next line as I understand it is the last vallu of the message being 0 a return to off or o out of 127 if you will.

byte lastAnalogValue[6] = {0,0,0,0,0,0}; // define the "lastValue" variables

And these I understand to be the actual program number being sent like a number 7 is reserved for volume.

byte midiCCselect[6] = {22,23,24,25,26,27}; // select the midi Controller Number for each input (22 to 31 are free)

But this is just what I am assuming from the code i got from the top of the page, also I noticed that their is a descripancy on how my midi id hooked up, ive looked at a few of the different schematics and some show what is above, but even in thhose 2 pictures the fritzing pic does not match the schematic the fritzing has or at least from the looks of it the bottom pin going to 5+ but its labeled 2? I have mine wired like this pic

I alsso have own more concern why maybe none of this is working for me at all, im wondering if according to the schematic shown above I have it connected exactly as shown assuming that your looking at the back of the midi terminal, and it occurs to me that MAYBE they are showing the front of the terminal, but the lugs are on the back, so my plus and (TX) should be switched.
See, i do not know what pin number is what, none of my connectors are numbered, SO this has just occurred to me. mine is wired so that looking at the back of the terminal mine is the all metal kind with 2 screw holes, not the pcb type so looking at the back at the solder terminals top middle is not used 1st down on left and right side are not used. 2nd pin down on the left goes to 1(tx) middle and if im correct this is where you suggested I also need a 220 resistor. The bottom pin goes to ground, and 2nd pin down on right goes to 220 ohm then 5+ remember as I did this im looking at the back, but maybe the schematic shows the front witch would make my positive and my digital out (TX) backwards or hooked to the wrong side, can anyone confirm this? how do they describe the pin #'s by looking at the front of the plug as in where you would plug in or the back as it looks like in the schematic. because somethings wrong, I cannot get this thing to do any examples from the Example sketches from V023 or V1 of the IDE If everything wasn't soldered up, id just switch them and see, but as I mentioned, most of this was already in an enclosure all soldered up, for a different project an being this was such a simple change, i only need to remove a few wires, and ad a few.Plus the box is its metal, so I even got heat shrink on some of the positive leads, and the whole board is covered in Chrysler build tape so nothing shorts out being in the metal box and all.
so if anyone can answer the pin out question first of all.
I just want to hear one sound come out or one control move, even if its the wrong one, ill know Im getting SOMEWHERE, and then i can move on to the code issue "Nantonos" suggested above, or maybe that's what i need? im at a loss Ive built way more complex thing with the arduino, and this should be simple, and I know its usually the simple things you overlook, that's what made me think of the opposite sides of the pi out because looking at the 2 pics I posted before those were right next to each other in the same tutorial, and those don't match to one another either? AS ALWAYS ANY INFO OR HELP ALWAYS APPRECIATED! THANKS FOR READING.