Offline
Sacramento, CA

Alright, this has been troubling me so much i've decided to make my own thread. First, video and pictures, then i'll explain myself more.

Video Update:  http://youtu.be/mQkDFxm7DW0

Pictures:



I'm not entirely sure how to force start into mGB. Is this what the code should look like?

code wrote:

boolean alwaysUseDefaultSettings = true; //set to true to always use the settings below, else they are pulled from memory for the software editor


boolean usbMode                  = false; //to use usb for serial communication as oppose to MIDI - sets baud rate to 38400


byte defaultMemoryMap[MEM_MAX] = {
  0x7F,0x01,0x02,0x7F, //memory init check
  0x01, //force mode (forces lsdj to be sl)
  0x05, //mode

I've also tried:

code wrote:

0x05, //force mode (forces lsdj to be sl)
  0x05, //mode

Anyways, i'm fairly certain it has to be with the code, i've literally switched out every major part and have built the arduinoboy from "scratch" 3 times. I know it may seem like i've been spamming because this board is relatively slow, so sorry for that. This thread will be the last of it unless I get advice and/or figure it out.

And what do I do with Pin 3 if I take the switching circuit out to force start mGB?? I've tried every conceivable option and none worked.

*Previous troubleshooting posts: http://chipmusic.org/forums/post/111433/#p111433

Last edited by Slumpy (Jun 10, 2012 7:14 am)

Offline
Sacramento, CA

I've thought up some elaborate experiments to make sure all the parts work on their own. They do. Every hardware part works. The problem must be the code. I am clueless in this department. Please help!

I can visibly see my computer sending midi data; if I unplug the cord and plug it in my keyboard, my keyboard receives the data and plays the notes. I'm not sure how to use the serial monitor in the arduino program, but when I open the box it has nothing so I'm assuming it isn't receiving data. This is my second optoisolator and the last one the store had. I'm sure it works on its own due to continuity testing between relevant pins. There are no shorts and the pins are all securely held into the arduino. I'm now assuming "0x04, //mode" is mGB because LED 6 lights up when I restart the board and 0 counts as a mode, which would make 4 - mode 5.

Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Last edited by Slumpy (Jun 9, 2012 8:56 pm)

Offline

I watched your video and found that the LEDs keep cycling after the button being pressed, which doesn't seem to be normal... Maybe it is a problem of your push button setting. You may want to check if it has a pull-up resistor or a pull-down one because this will inverse the 'high' and 'low' in Arduino. I am myself a newbie so good luck! And after seeing your using the sparkfun midi shield I am 99% certain now as the shield use pull-up resistor. I built mine with the same shield and it works fine.

Try change:

if(!memory[MEM_FORCE_MODE] && buttonDepressed)

to

if(!memory[MEM_FORCE_MODE] && !buttonDepressed)   

in the 'Mode' tag in Arduino IDE.

Last edited by syn (Jun 9, 2012 9:14 pm)

Offline
Sacramento, CA

Thank you for acknowledging my existence and the fact that I am, in fact, having problems with this straightforward and relatively simple project. I'm starting to question my sanity here. Anyways, I re-uploaded the code and I've reversed the connections on my switch and it still cycles through. Unless it says somewhere that you need a certain special switch I got just a regular SPST push-on/off switch.

Hmmmm, as I was writing this it started doing something I have not seen before, it cycles through the LEDs in a seemingly random order, and then remains on LED 2 (Mode1) for awhile before doing it again....I may be on to something. Even when I switch it seems to always come back to LED2

Sweet, i'll try the code and update you

Edit: Tried the code and it's back to cycling through. I'll try and video the random order and LED2 re occurance and upload it though

Edit: Also just noticed that you talked about the sparkfun midi shield thread. No i'm not using that, just didn't want to make a new thread because we had the same problems, just he decided to never update his thread and I still can't figure it out. I'll check to see what kind of push button I have.

Last edited by Slumpy (Jun 9, 2012 9:31 pm)

Offline
Los Angeles

The button you are using... is it a momentary push button or a switch?
It should be a momentary push button ie: it doesn't lock to on and lock to off, only on when held down.

Offline
Sacramento, CA
trash80 wrote:

The button you are using... is it a momentary push button or a switch?
It should be a momentary push button ie: it doesn't lock to on and lock to off, only on when held down.

Thaank you, i'm off to get a momentary push button!

Also, can you tell me what the right code is for force starting mGB?

Last edited by Slumpy (Jun 9, 2012 10:25 pm)

Offline

I think you have the right code here if not mistaken

byte defaultMemoryMap[MEM_MAX] = {
  0x7F,0x01,0x02,0x7F, //memory init check
  0x01, //force mode
  0x05, //mode (MGB)

Hopefully changing the button will solve the problem

Offline
Sacramento, CA

THE SWITCH WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! You guys were right; I bought an open position momentary SPST pushbutton switch. Now i'm getting somewhere, still no sound from mGB. I'm going to eat something and then start troubleshooting this midi in.

Damn, progress feels good though smile

Offline
Sacramento, CA

Update, I accidentally had it on channel 2, not the whole time, just when the mpk25 native program is up it automatically goes to channel 2. (I never use the program, in fact, trouble shooting this arduinoboy was the first time I used it) With cubase open and proper midi routing IT FINALLY WORKS!!!!! 3 DAYS AND IT WAS ALL BECAUSE I HAD THE WRONG SWITCH!!!!! YESSSSSSSSSSSSSSSS!!! I'M GETTING DRUNK TONIGHT TO CELEBRATE AND JAM!!!!!! Not like i'm an alcoholic or anything, just looking for any reason to get drunk off wine...wait a second...


FUCK YES!


That's seriously just my luck though, the wrong damn switch, haha.

Cheers Syn and Trash80

LAST UPDATE: Just for those who stumble onto this thread with the same problem.

The proper switch makes all the difference! Make sure you have an Open SPST Momentary Pushbutton Switch. My earlier MIDI problems when I was trying to force start mGB was due to a defunt optoisolator. There was no continuity between pins 2 and 3. There were only 2 optoisolators at the store, one was in nice packaging and the other was in fucked up packaging. I obviously got the nicely packed one first, but you should never judge a component by its packaging because it ended up being broken!

Last edited by Slumpy (Jun 10, 2012 7:17 am)