-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems using 8 motorized faders and Midi Interface #3
Comments
I don't immediately see any problems with what you've described, that should work fine in theory. Could this be a power issue? You can start debugging by using a simple program to the Mega, e.g. one that just sends a setpoint change over I2C every second or so, this way you can eliminate any MIDI-related issues. If you post your code I'll have a quick look at it, maybe I can spot something obvious. |
I think is not a code problem... In fact... this morning I was trying many things and I just upload your code to the mega, exactly as you wrote... the only difference was that I changed the midi interface for a Hardware serial midi... Another thing that I realized was that when I disconnect just the SDA line to the second slave, the first slave start to work fine, but obviously not the second. |
Here is my code anyway, thank you pieter!
|
Are you sure this is the correct baud rate? Hardware MIDI with 5-pin DIN connectors use a baud rate of 31250 symbols per second, not 115200. 31250 is the default, so you can just use: HardwareSerialMIDI_Interface midiser {Serial}; I didn't look into the rest of the code in detail, but it's in dire need of some arrays, there's too much code duplication. Also, you need one Hysteresis object for each fader. |
Actually the first baud rate that I try was 31250, and the behavior was the same... I changed it to 115200 just trying to fix it... |
It won't solve the problem you're facing right now, it's just a remark. I'd try changing the setpoint without MIDI as I mentioned in my first reply. |
Thank you! I will try with a simple program sending setpoints and I will let you know! |
Hi Pieter, is definetely not a midi problem, I did a simple program as you suggest and happens the same... when it is connected to the usb works perfect, but if not nothing happens. this is the program that I tried:
So I assume, must be a power issue... or maybe a proble with the mega... I will keep researching... |
I finally solve it!! I'm so happy haha |
Glad to hear! There seems to be a timeout option in the Wire library: arduino/reference-en#895 |
I'll check that, thank you for your support! |
@Vahen1981 since you got it to work, it would be interesting if you could create a fork with your code, wiring and all. At the very least it would be easier to follow that a code in a comment of an issue... |
Hi Pieter! I hope you are fine...
First of all, I should say that I'm pretty new in this things, and since many days I'm trying to understand your code for motorized faders. At this point I think I learnt a lot, but there is still a huge part of your code that is too much complex for my understanding. So, please forgive me if my questions are too basic.
I was trying to run 8 motorized faders using two arduinos pro mini for the fader controller, and a mega 2560 pro (the small version of arduino mega) for the midi controller.
I took your sketch "MIDI-Controller.ino" and I modified a bit to run this 8 faders through this two slaves. I choosed the HardwareSerialMIDI_Interface for this project.
Everything was fine, the eight faders were running very good, untill I disconnected the usb from the mega... I don't know why, but when I did this appears that the master doesn`t send anything to the slaves... I am using the rx0 and tx0 pin for the midi circuit, and an external power supply.
Another sintom is that if I disconnect the second slave, I can disconnect the usb from mega without any problem, but obviously just with 4 faders.
Any suggestion about where is the problem?
The text was updated successfully, but these errors were encountered: