Offline

Using a Teensy 3.2, I can compile and upload the sketch from https://github.com/trash80/Arduinoboy fine.
It goes through the startup animation on the LEDs.
I can select a mode with the button.
It even remembers the mode when I restart.

I'm trying to use mGB mode.
But when sending midi from my computer, using Live, through USB, I don't get any status LED changes (or any sound on my gameboy).

The settings in the Arduino IDE are:
Board: "Teensy 3.2 / 3.1"
USB Type: "MIDI"
CPU Speed: "96 MHz (overclock)"
Optimize: "Faster"
Keyboard Layout: "US English"
Port: "HID=#### MIDI (Teensy 3.2)"

I can also see a "Teensy MIDI" in my Audio MIDI Setup on macOS and can see "Teensy MIDI" in Live as a "Midi to" output.

I've used the same pins as in the original code. I updated all the libraries in the Arduino IDE. I tried other USB Types to see if there was some serial debugging info printed.

Here is a picture of my breadboard layout:

I also have an Arduino UNO with a which I can send midi to fine with a USB to DIN 5 cable.

I'm not sure where I have gone wrong, since the start up and mode selection appear to work. Does anybody have any ideas?

Offline
Sea of Souls

The original code doesn't listen for USB MIDI, only din MIDI but I'm sure theres a usb code floating around. Try googling teensyboy.

Offline

Oh right cheers, I thought this file would handle USB midi for Teensy right? https://github.com/trash80/Arduinoboy/b … sbMidi.ino

Offline
Sea of Souls

That does look right. Maybe it is on the PC side after all. What MIDI channels are you sending?

Offline

Channel 1

Offline
Sea of Souls

I realized after asking that you already have DIN MIDI working on another MCU, so I doubt you're doing anything wrong. I noticed in the main arduino sketch that "teensy usb midi is supported" and your LEDs work, so all of that is correct. I really don't know whats wrong. Could you possibly try another software or even computer, maybe with windows?

Offline
Unsubscribe

There was a merged pull request the other day with stuff for teensy, have you updated your sketch?

Offline

I've been attempting a very similar setup to you, and am getting the same problems. Did you ever find a resolution to this? I'll follow up if I manage to get mine working

Offline
NUMBSKULL

The only thing that seems out of place to me is the settings to overclock the CPU. That is not needed. Just use the defaults. I'd be surprised if it makes much of a difference.

Maybe try a simpler midi program to send the midi data? I use this and really like it: https://flit.github.io/projects/midikeys/

Also I'd try sending midi on all the channels. By default mGB works on channels 1-5 but it's possible the eprom got messed up if you had a previous sketch running that changed it. On this line: https://github.com/trash80/Arduinoboy/b … y.ino#L115
Just change one of those 4 bytes to something else, for example change the first one from 0x7F to 0xFF and then reupload.

The thing that's the most confusing is that the LEDs work on boot, so it must just not be receiving MIDI data in the ways it's wanting to, most likely on the wrong channels.

Offline

Thanks for all the suggestions catskull. I'm not sure about richy, but I haven't had any luck yet. I get all LEDs on boot still, but they never seem to respond to any input but a mode change.

The usbMode shouldn't be enabled, correct? https://github.com/trash80/Arduinoboy/b … y.ino#L112
I've tried it on and off just in case, but it makes no difference.

I've tried the byte change that you suggested, as well as trying output on channels 1-16, but still haven't had any luck.

Is the 1.3 release of Arduinoboy what I should be using for this? I'm new to both github and Arduino so I'm just making sure I'm not missing something obvious here. As far as I can tell, 1.3 supports Teensy and USB support according the documentation.

Ultimately, if I can't get it working, I'll purchase one of your prebuilt Teensyboys which look awesome - I was just hoping to learn something from getting this running if I can.

Thanks again for the help.

Offline
NUMBSKULL

Sorry to hear it's still just not working!

The usbMode variable is used to output midi over the serial port in the Arduino, you shouldn't use it, but also I don't think it will do anything if you're using USB midi one way or the other.

Yeah the latest code is what I use on mine, I use Teensy LC but I can't see how a 3.2 would behave any differently.

What program are you using to send midi? Have you tried a different one, like the one I linked to above? I just like to rule out any possibility of software issues.

The other idea I had is I've seen a handful of people where their USB cable is bad. It supplies power, but the data lines are broken and won't send any data. If this was the case here, I'd think the teensy wouldn't even show up on the PC at all, but it's an easy and quick thing to just try a different cable!

Really sorry to hear people are having trouble! I want people to DIY these, I don't want to be the only option for a working arduinoboy!

Maybe a last ditch effort would be to use my fork? https://github.com/catskull/Arduinoboy
The only difference should be that I use an internal pullup for the button switch, so you can just remove the resistor for the push button and wire it directly to the arduino and ground.

Offline
Los Angeles

As I mentioned in the github issue richy486 submitted, there were some recent commits to the code that I did not personally test. You can try this version here:
https://github.com/trash80/Arduinoboy/t … df93d006a6

Just download it and try it. This link is to the previous version before the change were made

Offline

Thank you Trash80 and catskull for the help!

I tried both the version Trash80 posted, as well as catskull's fork, and neither worked off the bat. After trying swapping the usb cable, as well as using several different midi sending programs (I was using Reaper, but also tried several free keyboard programs as suggested), I still wasn't having any luck.

I eventually tried swapping the Arduino USB Type to "All Of The Above," and I've finally gotten the LEDs to respond to the midi out from Reaper. I haven't gotten it to talk properly to the GBP yet, but there's plenty of things I can try and troubleshoot on that before I give up, first being my wiring.

A couple quirks I'm running into though on the Arduino side:

1. Due to the "All of the Above" USB setting, the Teensy enumerates a ton of virtual devices, and clogs up midi selection menus due to this. A small price to pay, but I'll be trying the other USB types to see if any others work as All of the Above does.

2. I still could not get the version that Trash80 linked to to work as of yet. Currently only catskull's fork is responding for me.

3. On all versions I have tried to use, using the mode button does not loop back to 1 after 7. If I click past 7, no lights will light up from mode changes, and I have to use a clear EEPROM sketch to empty the memory. The only way I've found to avoid this is to set the number of modes in the main Arduinoboy.ino sketch to 6, in which case it goes to 6 then wraps back to 1 no problem. Is this indicative of anything specific I'm doing wrong?

4. When trying to use the USB type "MIDI", I often was getting driver crashes whenever I tried to access the Teensy midi device in any program. This doesn't appear to be happening anymore with All of the Above selected, but I thought it was worth noting.

Thanks again for all the help, I'm very new to all of this still. If anybody has any insight to the strange behavior, I'd love to hear it. In the meantime, I'm going to making sure my serial connections to the GBP are correct.

Offline
NUMBSKULL

What OS did you say you are on? I know on Mac it keeps old midi devices around and can sometimes be weird. If you go to audio midi setup, then hit cmd+2 you can see all your midi devices. I'd just select them all and hit delete. Do this with it unplugged.

3) What happens if you unplug the link cable completely? Disconnect it from the teensy. Seems like I've seen midiout mode get "stuck" if it thinks it's receiving data from the gameboy.

I'd honestly be surprised if my fork does anything differently really. It sounds like it's more of a system/OS issue. My code is 99% the same.

Offline

I'm running Windows 10 on this computer, which is also why I couldn't use the exact MIDI keyboard program you recommended above. From what I've read, I can probably go through the unnecessary software devices and uninstall them manually to make them disappear, but I probably won't bother doing that until I've got the rest working.

I don't have a link cable, and am intending to build the teensy inside the GBP, so at the moment I have the 4 connections that would usually be through the link cable hard wired between the teensy and the GBP. I've triple checked these, and they seem to line up as expected (double checked with a meter and everything), but I'll unsolder them completely and see what behavior changes. There may be an aspect to hard wiring these connections that I'm overlooking in comparison to using a broken out link cable. Some error on my part here might also account for the difference in behavior between your fork and the standard build, but I don't know enough yet to be sure.

Thanks again for all the input. I'll be updating this thread whether I solve my issues or not in the hopes it can help others who run into similar issues.

Offline
Sea of Souls

Since your LEDs are responding now, I think it's time to look at your "link cable." Its possible you have Data IN and Data OUT switched.Can you just swap the solder points on ONE end of the cable and give that a test?