yan_g

I try to send a control change message on channel #1, control #16. I get erratic values on erratic control numbers. I thought it might be an int to byte conversion problem but I don't even know how to check that.

yan_g

I have actually found that my circuit was wrong when I tried my previous working MIDI out code... I feel stupid for posting before even trying that, sorry... I do receive correct data now, but only for a few seconds, it then becomes erratic again. I thought some bits could be lost during the serial transmission... Has anobody experienced something similar? I'm using a MIDI socket that fits in my breadbord, should I try to solder wires to the legs instead? Could it be more reliable or are there other things to check first?

So, I tried out your sketch on an Arduino UNO r3. I made the change I suggested earlier regarding byte rather than integer types.Since I was using the rugged circuits MIDI sheild, you will also see some extra lines which enable MIDI.To make monitoring easier, I added a delay in the main loop.

Connection was to the MIDI-in on my audio interface (PreSonus AudioBox 44VSL). Monitoring was with MIDI-OX

Results were as expected, I got all values between 0 and 127 inclusive over the range of travel of the pot. I used a 10-turn 1/4W wirewound 10k linear pot. Monitoring for several minutes did not reveal any erratic readings.

Looking at page 2 of the schematic shows a similar output circuitry to the MMA reference one - a couple of inverters and a 240R resistor.

HANKENSTIEN

For what its worth, I have been following this and one of your other posts, as I was having very similar issues. Nantoons was quite help ful there as well, for me my issue, as best as I can tell is that the pots I had were garbage, thy were new, or at least as far as I know, bought them Very cheap of ebay. so i need a different pot for another project, so I had gotten some more, and it seems like that was my issue! and the strange thing is that i got the same stable results from a 1k and a 20k pot so that answers my question if it maters on the pots resistance, as I was using 5k pots, and though maybe I needed 10k only because it seems like that's what is in many tutorials, I do think it would be a good size to use though. In one of your questions you asked if you should solder your midi port, in my experience, any wiggle room will send all sorts of garbage thru so you may want to do that or if you are still needing it to be in the bread board, find some nice tight holes if you can and if it seems suspect you can always wiggle it around a little. and as a side note, I am using slightly modified version of your other code, combined with a couple lines of nantoons, because, I picked up a midi shield to eliminate wiring problems, and then realized that i still had the same issues, but, that it was the same shield that nantoons was using.Good luck, and post your resultsHANKENSTIEN

HANKENSTIEN

Do you have any other brands to try, I went through a whole lot b4 i figured out it was the pots, I ha even checked mine with a ohm meter, and they seemed stable enough, but, in the end that's what it was for me. but, im using abelton, as nantoons who is a very helpful person has shown me that the code, I was using which I believe was based on yours worked for me on the software, but not one the hardware, he just posted, some code for me on the other post on here, I believe you started that one, as well, I just did a reply, so it should be towards the top, maybe some of the code he gave me will benefit you? good luck, who would have thought this simple task would end up being so difficult. Ive built extremely more complex projects with lcds, and composite tv output with customized "text and video", temperature controlled 110vac window fan, "night" lights using 110v ac & relays, temp,humidity,altitude,and Barometric Pressure all displayed on a lcd, digital tape measures using sonar, and another one using Ir witch can also me used as safety or proximity sensor/ switches in a production plant, Infrared heat and motion detection alarm systems, an electric tuba, a synthesizer,base and treble visual Via Led volume meters, MORE...and then these dang midi controllers, for some reason, have really been tough and compared to the others these should be a walk in the park, and for me it ended up being the dang pots, who would have thought?