I am fairly new to coding, and cannot understand why I have this particular error:
MIDI_CC_SEND.ino:2:23: error: expected ',' or '...' before numeric constant
MIDI_CC_SEND.ino:6:23: error: expected ',' or '...' before numeric constant
Return code is not 0
Here is my code:
void setup(){
pinMode(3, INPUT);
pinMode(4, OUTPUT);
}
In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.
I have applied this to my code, and it has fixed the issue, but now I am getting another error:
/coreBuild/core.a(main.cpp.o): In function main': /sdk/hardware/arduino/cores/arduino/main.cpp:14: undefined reference to loop'
collect2: error: ld returned 1 exit status
Return code is not 0
I have been wanting to make a MIDI controller for my boss RC-5 looping station. I have looked at many different tutorials and sites to try and find a solution, but all of them do not specifically send a cc command through a din connector, which is what I've been looking for.
More specifically, all I have to do is send an ON signal over CC channels 80-87 when I press certain buttons. I have tried many codes but cannot get this to work.
it can't be that.
You call sendMIDI() function inside the function itself.:
While this is acceptable in some cases (it's called "recursion"), in your case it's absolutely the wrong approach. As a result, it created an infinite loop in your code.
In addition, you didn't call the function anywhere else in your code, that make the function completely useless.
I recommended you not going further until you read the C programming book chapter about function definition and calling.
I have merged your topics due to them having too much overlap on the same subject matter @rang33lxa .
In the future, please only create one topic for each distinct subject matter and be careful not to cause them to converge into parallel discussions.
The reason is that generating multiple threads on the same subject matter can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.
I have been wanting to make a MIDI controller for my boss RC-5 looping station. I have looked at many different tutorials and sites to try and find a solution, but all of them do not specifically send a cc command through a din connector, which is what I've been looking for.
More specifically, all I have to do is send an ON signal over CC channels 80-87 when I press certain buttons. I have tried many codes but cannot get this to work and as in have said I am new and hardly know where to start.
I also use an android tablet for coding using ArduinoDroid, if this makes any difference. Anything that could help me understand this would be appreciated.
As for a schematic I am just using a simple 5pin DIN out, and haven't stuck with a specific code. I am using an Arduino Uno and don't really want to buy anything new if I don't have to.
Why did you use a 3v3 output for your DIN connector? Is it mean that your midi device has a 3v3 logic level? - in that case you need a logic level converter to connect 5v Arduino to it.
@rang33lxa
In order for the forum to help you, you must provide the code you tried to send messages with. Without the code, there is simply nothing to discuss in this thread.
I have tried countless codes, all of which have failed and have had no effect watsoever. The most recent one is already posted on this discussion. I don't have any clue how to send a MIDI CC command and am requesting ideas and assistance.
That code is completely wrong as I wrote you above.
It can't work because the function sendMIDI() doesn't called anywhere in the program. If you fixed this by adding the call, say, in the loop() - you make the infinite loop in the code.
Your actual problem is not with the MIDI sending - the issue that you don't even have a basic understanding of how Arduino programs are written and what parts they consist of. You don't know what variables and values are, you don't know how to create and use functions.
You need to start with something simpler - for example, with Arduino examples for working with LEDs and buttons.