Arduino DIY on MorningStar Blog

On the MorningStar blog there is a DIY for an Arduino switch box that can be used with the MC6. Is there a way to implement midi thru into it. I am new to the Arduino and not very fluent in coding.
Can this be done with just adding another midi jack and adding something to the code?

Not sure if this is the right forum to get answers though. You might want to try the DIYstompboxes forum instead - you might get better responses regarding this there.

@james
So I had some time to kill and thought I would give the the DIY Arduino switch that thats posted on you blog a try. I cannot get either code to work. When I copy and paste or save and open the code with Arduino I ca not get the code to verify. the first error I get is,
‘MIDI’ was not declared in this scope
and if I add MIDI_CREATE_DEFAULT_INSTANCE(); to the code I get the following errors

C:\Users\User\Desktop\Arduino\Morningstar-External-Midi-Controller-master\Morningstar-External-Midi-Controller-master\MC6_Ext_Controller_2\MC6_Ext_Controller_2.ino: In function ‘void setAllLEDs(int)’:
C:\Users\User\Desktop\Arduino\Morningstar-External-Midi-Controller-master\Morningstar-External-Midi-Controller-master\MC6_Ext_Controller_2\MC6_Ext_Controller_2.ino:43:32: warning: invalid conversion from ‘byte* {aka unsigned char*}’ to ‘uint8_t {aka unsigned char}’ [-fpermissive]
digitalWrite(ledArray, type);
^
In file included from sketch\MC6_Ext_Controller_2.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:135:6: note: initializing argument 1 of ‘void digitalWrite(uint8_t, uint8_t)’
void digitalWrite(uint8_t pin, uint8_t val);
^~~~~~~~~~~~
C:\Users\User\Desktop\Arduino\Morningstar-External-Midi-Controller-master\Morningstar-External-Midi-Controller-master\MC6_Ext_Controller_2\MC6_Ext_Controller_2.ino: In function ‘void setup()’:
C:\Users\User\Desktop\Arduino\Morningstar-External-Midi-Controller-master\Morningstar-External-Midi-Controller-master\MC6_Ext_Controller_2\MC6_Ext_Controller_2.ino:76:19: warning: large integer implicitly truncated to unsigned type [-Woverflow]
MIDI.begin(31250);

Any ideas? I dont know the first thing about coding, I know how to copy and paste, lol

1 Like

I didn’t know about this blog, thanks for the heads up, I’m gonna check it out. Just bought a Arduino Duet for a different MIDI experiment.

@james
I finally got the arduino working. There was a code error I found. Anyhow, I have it working but ran into another road block.
when I press the button it works as it should on the MC6 but the info stops there. For some reason its not making it out . I can press say button G and I can see it toggle just fine on the MC6 but it doesnt change anything on my board. I have tried turning on midi thru and turning it off. I have tried the same with cross midi thru. Do you have any suggestions of what to try next. I have also tried several different settings under global expression.

What CC message are you sending with button G?

I use Preset G on the MC6 to toggle the HX stomp between active and bypass.

Cc change 1 / press/ pos 1/ cc70/val63/ ch 4
CC 2 / press / pos 2 / Cntl Chg /cc #70 / Val 127 / ch 4.

With the arduino I can successfully bank up and down on the MC6 but it doesn’t assume the role of the buttons G - L. It makes the changes on the MC6 but nothing on my board changes , if that make sense.

@james . I got it , I got it. The code had the right CC for the buttons and bank up and down but I had to change the value in the code to 1, it was set to 0 in the original code. according to the dictionary in the editor 0= Nothing, 1= on press, 2= on release ect… Im sure you know it by heart. So now I have it working on the bench with a bread board and 2 switches. Im going to add the rest of the switches and test it out before boxing it up but I think its all worked out now and good to go.

Do share a picture of your build once you’re done :slight_smile:

Sorry I can’t help much with the code - wrote it a long time ago and I don’t think I can spend time troubleshooting it. But yes, as long as you’re sending the right CC messages to control what you want according to the MIDI implementation, it should work

@james here ya go. All finished and working. I decided to go with just 6 buttons because the box I ordered wasn’t big enough for all 8 without being to crowded. Works great, it was a fun learning experience. I mainly build effect pedal clones so this was something different. Enjoy. Oh and the code wasn’t that bad , it was just missing 1 line.

image image

2 Likes

looks good! Are the labels laser etched?

No there not laser etched, I wish I had that capabilitie. I have a Cricut Joy decal cutter. They are just peel and stick vinyl. I bought a box with the same dimensions as the MC6 and also set buttons G H I lower than J K L like is done on tje MC6. I have made a 3 button switch box that does page and bank up / down so I didnt really need to build this but it was fun and I learned a few things. I like building things .

1 Like