Katana MKII 50W - 'Katana Solutions USB Foot Controller' - In Progress

Started by StevenMartin, February 11, 2020, 04:17:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

StevenMartin

Okay, I'm taking the plunge and giving this a go for myself.  I know a lot has already been covered in this area with working projects but a lot of their code goes way over my head so it's hard to learn from them. I'm very new to coding and circuitry (first-ever project in both fields) so if anyone can correct me where they see faults I'd love the support.

The plan is to build a USB foot controller (Which I'm dubbing the 'Katana Solutions' board  ;D ) that has 12 footswitches, each with LEDs, and then an LCD display. It will connect to the Katana via USB.

The 12 footswitches will control; Mute, Panel/Edit, CH1a, Ch2a, CH1b, CH2b, RVB On/Off, DLY On/Off, DLY Tap, BST On/Off, Mod On/Off, FX On/Off.

So far I've been using Pocket Midi for Mac https://www.morson.jp/pocketmidi-webpage/. When I connect the Katana to the Mac and use Pocket Midi and have BTS open on the Mac I've been able to intercept SysEx messages between the two when changes are made in BTS. The plan is to use an Arduino to send the SysEx messages when each footswitch is pressed to toggle on/off the effects or change channels.

After a fair bit of googling and learning what SysEx messages are (plus how to calculate checksums) and working from the intercepted Pocket Midi Monitors, I've worked out almost all of the SysEx messages I need to send to turn the effects and channels on and off. I've tested these by sending only one SysEx message to the amp from Pocket Midi SysEx terminal and I can now control the features I want to toggle via just sending SysEx from the Mac. I also learned how to query via SysEx, to return a message saying if an effect is already on or off, or returning saying which amp type or channel is currently selected.

Here's the list of the SysEx's I've scraped so far:

F0 41 00 00 00 00 33 11 00 01 00 00 00 00 00 01 7E F7 // Check Channel Status
F0 41 00 00 00 00 33 12 00 01 00 00 00 00 7F F7 // Panel
F0 41 00 00 00 00 33 12 00 01 00 00 00 01 7E F7 // Ch-1a
F0 41 00 00 00 00 33 12 00 01 00 00 00 02 7D F7 // Ch-2a
F0 41 00 00 00 00 33 12 00 01 00 00 00 05 7A F7 // Ch-1b
F0 41 00 00 00 00 33 12 00 01 00 00 00 06 79 F7 // Ch-2b
F0 41 00 00 00 00 33 11 10 00 00 00 00 00 00 10 60 F7 // Get Panel Name
F0 41 00 00 00 00 33 11 10 01 00 00 00 00 00 10 5F F7 // Get Ch1a Preset Name
F0 41 00 00 00 00 33 11 10 02 00 00 00 00 00 10 5E F7 // Get Ch2a Preset Name
F0 41 00 00 00 00 33 11 10 05 00 00 00 00 00 10 5B F7 // Get Ch1b Preset Name
F0 41 00 00 00 00 33 11 10 06 00 00 00 00 00 10 5A F7// Get Ch2b Preset Name


F0 41 00 00 00 00 33 12 7F 00 01 04 00 01 7B F7 // Write to current CH
F0 41 00 00 00 00 33 12 7F 01 00 03 00 7D F7 // Clear current CH



F0 41 00 00 00 00 33 11 60 00 00 21 00 00 00 01 7E F7  // Check Amp Type
F0 41 00 00 00 00 33 12 60 00 00 21 17 68 F7 // Amp Brown
F0 41 00 00 00 00 33 12 60 00 00 21 20 5F F7 // Amp Brown V
F0 41 00 00 00 00 33 12 60 00 00 21 18 67 F7 // Amp Lead
F0 41 00 00 00 00 33 12 60 00 00 21 1F 60 F7 // Amp Lead V
F0 41 00 00 00 00 33 12 60 00 00 21 0B 74 F7 // Amp Crunch
F0 41 00 00 00 00 33 12 60 00 00 21 1E 61 F7 // Amp Crunch V
F0 41 00 00 00 00 33 12 60 00 00 21 08 77 F7 // Amp Clean
F0 41 00 00 00 00 33 12 60 00 00 21 1D 62 F7 // Amp Clean V
F0 41 00 00 00 00 33 12 60 00 00 21 01 7E F7 // Amp Acoustic
F0 41 00 00 00 00 33 12 60 00 00 21 1C 63 F7 // Amp Acoustic V




F0 41 00 00 00 00 33 12 60 00 00 10 01 0F F7 // Boost On
F0 41 00 00 00 00 33 12 60 00 00 10 00 10 F7 // Boost Off
F0 41 00 00 00 00 33 11 60 00 00 10 00 00 00 01 0F F7 // Boost Check Status
F0 41 00 00 00 00 33 12 60 00 01 00 01 1E F7 // Mod On
F0 41 00 00 00 00 33 12 60 00 01 00 00 1F F7 // Mod Off
F0 41 00 00 00 00 33 11 60 00 01 00 00 00 00 01 1E F7 // Mod Check Status
F0 41 00 00 00 00 33 12 60 00 03 00 01 1C F7 // FX On
F0 41 00 00 00 00 33 12 60 00 03 00 00 1D F7 // FX Off
F0 41 00 00 00 00 33 11 60 00 03 00 00 00 00 01 1C F7 // FX Check Status
F0 41 00 00 00 00 33 12 60 00 05 00 01 1A F7 // Delay On
F0 41 00 00 00 00 33 12 60 00 05 00 00 1B F7 // Delay Off
F0 41 00 00 00 00 33 11 60 00 05 00 00 00 00 01 1A F7 // Delay Check Status
F0 41 00 00 00 00 33 12 60 00 05 40 01 5A F7 // Reverb On
F0 41 00 00 00 00 33 12 60 00 05 40 00 5B F7 // Reverb Off
F0 41 00 00 00 00 33 11 60 00 05 40 00 00 00 01 5A F7 // Reverb Check Status


// Bulk Check (Channel Check, Channel Name Check, Amp type Check, Bst/Mod/FX/DLY/RVB check)
F0 41 00 00 00 00 33 11 00 01 00 00 00 00 00 01 7E F7

F0 41 00 00 00 00 33 11 10 06 00 00 00 00 00 10 5A F7

F0 41 00 00 00 00 33 11 60 00 00 21 00 00 00 01 7E F7

F0 41 00 00 00 00 33 11 60 00 00 10 00 00 00 01 0F F7

F0 41 00 00 00 00 33 11 60 00 01 00 00 00 00 01 1E F7

F0 41 00 00 00 00 33 11 60 00 03 00 00 00 00 01 1C F7

F0 41 00 00 00 00 33 11 60 00 05 00 00 00 00 01 1A F7

F0 41 00 00 00 00 33 11 60 00 05 40 00 00 00 01 5A F7


// Bulk Check (Set All FX Off Test)
F0 41 00 00 00 00 33 12 60 00 05 40 00 5B F7
F0 41 00 00 00 00 33 12 60 00 05 00 00 1B F7
F0 41 00 00 00 00 33 12 60 00 03 00 00 1D F7
F0 41 00 00 00 00 33 12 60 00 01 00 00 1F F7
F0 41 00 00 00 00 33 12 60 00 00 10 00 10 F7



// Bulk Check (Set All FX On Test)
F0 41 00 00 00 00 33 12 60 00 00 10 01 0F F7
F0 41 00 00 00 00 33 12 60 00 01 00 01 1E F7
F0 41 00 00 00 00 33 12 60 00 03 00 01 1C F7
F0 41 00 00 00 00 33 12 60 00 05 00 01 1A F7
F0 41 00 00 00 00 33 12 60 00 05 40 01 5A F7


Next up.. I don't have any hardware just yet but I've been eyeing up this starter kit: https://www.elegoo.com/product/elegoo-mega-2560-r3-project-basic-starter-kit/ that comes with a clone Arduino Mega and some LED's resistors and basic push buttons for breadboarding (we can pick up the footswitches when we know it all works!) plus a 16,2 LCD.

I'm frantically trying to learn to code for the Arduino but this is going very slow. So far I've been messing about in a virtual environment on a site called Tinkercad. I've got a virtual Uno on there connected to 5 buttons with 5 LEDs and an LCD display (only 5 because I've used up everything including the analog pins (used as digital pins for the LCD) already!

At the moment the 5 buttons toggle on/off states for 5 effects (Reverb, Boost, Delay, Modulation and FX) and we turn on the correct LED, and update the FX status on the LCD. I also print the effect status to the Serial Monitor followed by the appropriate SysEx code but hopefully, on real hardware I can replace this line with the correct code to submit the SysEx over USB.  Obviously (unless someone is a wizard and knows something I don't!) the virtual Arduino can't actually communicate outside of the web browser so we can't go much further there other than bug checking.

The plan for the 'real deal' is to start the foot controller up, request the current amp channel and all FX states so we can set up the right FX states and LEDs on the controller. Once both foot controller and amp say the same thing then we can fire off SysEx messages over USB to make the fun happen. Next on my to-do list is to ask the user during setup to manually enter SysEx codes when asked via Serial Monitor to manually do the initial 'setup' of the board.

If you want to check out what I have the link is here: https://www.tinkercad.com/things/eaRIe0fvAFL If you try that in Tinkercad the LCD doesn't work you have to run the simulation and then max out the potentiometer to make the LCD come on. Then you can restart the simulation. I understand my coding is probably sub-amateur but I'm still learning and this is the best I can manage with what I've learned over the last few days.

I'll also post the code so far:


/*
Katana Solutions USB FootController - Steven Martin
Version 0.1

5 working buttons toggle effect states (on/off)
for Reverb, Boost, Delay, Modulation and Fx.

When a button is pushed, the effect state toggles
on/off. The LCD will show the new state then timeout
to show all current effects..

Each time a button is pushed the serial monitor shows
the new effect state plus the SysEx code we want to send.

Next to add...
Ask the user to submit SysEx codes via the serial monitor
during Setup to set the initial states of the effects/LEDs.

*/


// Delay Time
int dt=0;

// Setup Reverb Variables
int RvbState=0;
int RvbLEDPin=5;
int RvbButtonPin=13; 
int RvbButtonNew;
int RvbButtonOld=1;
String Rvb;
String RvbOnSysEx="F0 41 00 00 00 00 33 12 60 00 05 40 01 5A F7";
String RvbOffSysEx="F0 41 00 00 00 00 33 12 60 00 05 40 00 5B F7";
String RvbLcdState;

// Setup Boost Variables
int BstState=0;
int BstLEDPin=4;
int BstButtonPin=12;
int BstButtonNew;
int BstButtonOld=1;
String Bst;
String BstOnSysEx="F0 41 00 00 00 00 33 12 60 00 00 10 01 0F F7";
String BstOffSysEx="F0 41 00 00 00 00 33 12 60 00 00 10 00 10 F7";
String BstLcdState;

// Setup Delay Variables
int DlyState=0;
int DlyLEDPin=3;
int DlyButtonPin=11;
int DlyButtonNew;
int DlyButtonOld=1;
String Dly;
String DlyOnSysEx="F0 41 00 00 00 00 33 12 60 00 05 00 01 1A F7";
String DlyOffSysEx="F0 41 00 00 00 00 33 12 60 00 05 00 00 1B F7";
String DlyLcdState;

// Setup Modulation Variables
int ModState=0;
int ModLEDPin=2;
int ModButtonPin=10;
int ModButtonNew;
int ModButtonOld=1;
String Mod;
String ModOnSysEx="F0 41 00 00 00 00 33 12 60 00 01 00 01 1E F7";
String ModOffSysEx="F0 41 00 00 00 00 33 12 60 00 01 00 00 1F F7";
String ModLcdState;

// Setup FX Variables
int FxState=0;
int FxLEDPin=6;
int FxButtonPin=9;
int FxButtonNew;
int FxButtonOld=1;
String Fx;
String FxOnSysEx="F0 41 00 00 00 00 33 12 60 00 03 00 01 1C F7";
String FxOffSysEx="F0 41 00 00 00 00 33 12 60 00 03 00 00 1D F7";
String FxLcdState;

//VoidLoopCounter
int LoopCount;
int lcdTimeout=1500; // In number of void loops

String lcdCurrent;

#include <LiquidCrystal.h>
LiquidCrystal lcd(A0, A1, A2, A3, A4, A5);

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(16, 2);
lcd.print("Please Wait...");
delay(1000);
pinMode(RvbLEDPin, OUTPUT);
pinMode(RvbButtonPin, INPUT);
pinMode(BstLEDPin, OUTPUT);
pinMode(BstButtonPin, INPUT);
pinMode(DlyLEDPin, OUTPUT);
pinMode(DlyButtonPin, INPUT);
pinMode(ModLEDPin, OUTPUT);
pinMode(ModButtonPin, INPUT);
pinMode(FxLEDPin, OUTPUT);
pinMode(FxButtonPin, INPUT);
// Manual Setup Will be added here soon
Rvb="Not Set";
Bst="Not Set";
Dly="Not Set";
Mod="Not Set";
Fx="Not Set";
delay(1000);
lcd.clear();
lcd.print("Setup Complete!");
delay(1000);
lcd.clear();

 
  if (RvbLcdState != "R+ " && "R- ") {
      RvbLcdState = "R: ";
    }
    if (BstLcdState != "B+ " && "B- ") {
      BstLcdState = "B: ";
    }
    if (DlyLcdState != "D+ " && "D- ") {
      DlyLcdState = "D: ";
    }
    if (ModLcdState != "M+ " && "M- ") {
      ModLcdState = "M: ";
    }
    if (FxLcdState != "F+ " && "F- ") {
     FxLcdState = "F: ";
    }


}

void loop() {
   
//Check Change RVB
RvbButtonNew=digitalRead(RvbButtonPin);
if(RvbButtonOld==0 && RvbButtonNew==1){
  if (RvbState==0){
    digitalWrite(RvbLEDPin,HIGH);
    RvbState=1;
RvbLcdState="R+ ";
    Rvb = "RVB: On";
    Serial.println(Rvb);
    Serial.println(RvbOnSysEx);
    lcd.clear();
    lcd.print(Rvb);
LoopCount=0;
delay(dt);
  }
  else{
    digitalWrite(RvbLEDPin, LOW);
    RvbState=0;
RvbLcdState="R- ";
    Rvb = "RVB: Off";
    Serial.println(Rvb);
Serial.println(RvbOffSysEx);
    lcd.clear();
    lcd.print(Rvb);
LoopCount=0;
delay(dt);
  }
}
RvbButtonOld=RvbButtonNew;
   
//Check Change Bst
BstButtonNew=digitalRead(BstButtonPin);
if(BstButtonOld==0 && BstButtonNew==1){
  if (BstState==0){
    digitalWrite(BstLEDPin,HIGH);
    BstState=1;
BstLcdState="B+ ";
    Bst = "Bst: On";
    Serial.println(Bst);
Serial.println(BstOnSysEx);
    lcd.clear();
    lcd.print(Bst);
LoopCount=0;
delay(dt);
  }
  else{
    digitalWrite(BstLEDPin, LOW);
    BstState=0;
BstLcdState="B- ";
    Bst = "Bst: Off";
    Serial.println(Bst);
Serial.println(BstOffSysEx);
    lcd.clear();
    lcd.print(Bst);
LoopCount=0;
delay(dt);
  }
}
BstButtonOld=BstButtonNew;

 
   
//Check Change Dly
DlyButtonNew=digitalRead(DlyButtonPin);
if(DlyButtonOld==0 && DlyButtonNew==1){
  if (DlyState==0){
    digitalWrite(DlyLEDPin,HIGH);
    DlyState=1;
DlyLcdState="D+ ";
    Dly = "Dly: On";
    Serial.println(Dly);
Serial.println(DlyOnSysEx);
    lcd.clear();
    lcd.print(Dly);
LoopCount=0;
delay(dt);
  }
  else{
    digitalWrite(DlyLEDPin, LOW);
    DlyState=0;
DlyLcdState="D- ";
    Dly = "Dly: Off";
    Serial.println(Dly);
Serial.println(DlyOffSysEx);
    lcd.clear();
    lcd.print(Dly);
LoopCount=0;
delay(dt);
  }
}
DlyButtonOld=DlyButtonNew;

 
//Check Change Mod
ModButtonNew=digitalRead(ModButtonPin);
if(ModButtonOld==0 && ModButtonNew==1){
  if (ModState==0){
    digitalWrite(ModLEDPin,HIGH);
    ModState=1;
ModLcdState="M+ ";
    Mod = "Mod: On";
    Serial.println(Mod);
    Serial.println(ModOnSysEx);
    lcd.clear();
    lcd.print(Mod);
LoopCount=0;
delay(dt);
  }
  else{
    digitalWrite(ModLEDPin, LOW);
    ModState=0;
ModLcdState="M- ";
    Mod = "Mod: Off";
    Serial.println(Mod);
Serial.println(ModOffSysEx);
    lcd.clear();
    lcd.print(Mod);
LoopCount=0;
delay(dt);
  }
}
ModButtonOld=ModButtonNew;


//Check Change Fx
FxButtonNew=digitalRead(FxButtonPin);
if(FxButtonOld==0 && FxButtonNew==1){
  if (FxState==0){
    digitalWrite(FxLEDPin,HIGH);
    FxState=1;
FxLcdState="F+ ";
    Fx = "Fx: On";
    Serial.println(Fx);
Serial.println(FxOnSysEx);
    lcd.clear();
    lcd.print(Fx);
LoopCount=0;
delay(dt);
  }
  else{
    digitalWrite(FxLEDPin, LOW);
    FxState=0;
    Fx = "Fx: Off";
FxLcdState="F- ";
    Serial.println(Fx);
Serial.println(FxOffSysEx);
    lcd.clear();
    lcd.print(Fx);
    LoopCount=0;
delay(dt);
  }
}
FxButtonOld=FxButtonNew;

// Starts LoopCount - Shows current effects
// Loop count resets every time a switch is thrown (code above)

LoopCount=LoopCount+1;
 
  if(LoopCount==lcdTimeout){ // If LCD allows and doesn't flash too much then swap == for !=
    lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Current Effects:");
    lcd.setCursor(0, 1);
    lcdCurrent=(RvbLcdState+BstLcdState+DlyLcdState+ModLcdState+FxLcdState);
    lcd.print(lcdCurrent);
lcd.setCursor(0, 0);
    LoopCount=0;
  }

//Serial.println(LoopCount);
 
/* Serial Debug Print All Effect States

Serial.print(Rvb);
Serial.print("  ");
Serial.print(Bst);
Serial.print("  ");
Serial.print(Dly);
Serial.print("  ");
Serial.print(Mod);
Serial.print("  ");
Serial.print(Fx);
Serial.println();

*/

 
}


In my mind, I could use the built-in USB (that you program the Arduino with) to also send the data to the USB of the Katana. After some searching, I don't think this is the case.  Apparently the Teensy 3.6 can be a native host, but I don't think that has the digital pins to allow for 12 buttons, 12 LEDs plus an LCD display. Maybe I can get a USB Host Sheild for the Mega, but the ones I've seen so far are discontinued by Arduino so that's a little concerning for future development. I think the Arduino Due has enough pins to make this work plus I 'think' it has native USB host on it... But maybe I'm wrong.

And that's where we are so far! I'm sure as my coding skills develop I could decypher everyone else's successful builds... (MS3 for Katana, VCMini, Katana-Bridge) and learning how they got it working will provide hints but for now, even looking at the code on their Github pages goes way over my head so they're not helpful just yet.

But we are determined and I know it can be done!



Bauerbyter

Cool Project :-)
As you already saw I made something similar recently https://github.com/bauerbyter/KatanaFootController (what is easy customizeable for your needs. But I totally understand, that you want to build something on your own).

If you have some question, I try to help

StevenMartin

Thanks Bauerbyter! Yours is a big inspiration and looks great!. I 'could' just copy your hardware and code but I want to be able to write this myself and it's a cool opportunity to learn a new skill.

If you ever get super bored, then if you're able to glance over my current code and nudge me towards what 'subject' or approach I should read up on next to get things moving further, that would be awesome!

gumtown

Look on eBay for USB Host modules
search out this
Mini USB Host Shield 2.0 ADK Module SPI Interface Expansion Board

Your Arduino will need an SPI port to interface with the USB Host.
For the LCD display, ones with an  I2C interface (serial) use less Arduino pins, but the Arduino needs an I2C port.
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

StevenMartin

Appreciate that Gumtown - ordered the I2c and the SPI USB host board. From China no less, too... Hoping they don't include some complementary strains of coronavirus  :-X
but excited to get a breadboard set up and start the 'failing forward' process for real! ;D

StevenMartin

Initial breadboard prototype for the foot controller:


Nice to get stuff out of the 'Ideas and paper/computer' world and into something physical.
The full version will have footswitches, a 16x2 LCD, two extra buttons for Mute and Panel. It'll also have individually addressable NeoPixel LEDs so less wiring there too. Maybe I'll repurpose the small buttons here to control a nice menu and effect parameters on the LCD.

I've coded in basic functionality for the LCD but as I'm waiting on the LCD and the USB Host board in the post, for now, I'm emulating the SysEx communication over the serial monitor.

This is the first time I've ever written code in any programming language so it's a bit messy and inefficient but we'll get there.

The next stage is sending the SysEx over USB instead of to the serial monitor.

The code running in this video is:

/*

Katana Solutions USB FootController - Steven Martin
Version 0.1

5 working buttons toggle effect states (on/off)
for Reverb, Boost, Delay, Modulation and Fx.

When a button is pushed, the effect state toggles
on/off. The LCD will show the new state then timeout
to show all current effects..

Each time a button is pushed the serial monitor shows
the new effect state plus the SysEx code we want to send.

All SysEx are in the format of:
Header, Parameter Address, Data, Checksum, Footer

TODO:
-Add Panel to channels
-Setup mute button


*/


//Delay time for inside button toggle detects
int dt=0;

//Setup LCD
#include <LiquidCrystal.h>
LiquidCrystal lcd(A0, A1, A2, A3, A4, A5);

//Set up loop counter for LCD update timeout
// from toggle display back to main view
int LoopCount;
int lcdTimeout=1500; // In number of void loops
//Full set of current FX on LCD in shorthand
String lcdFXCurrent;

//FootswitchPins
int RvbButtonPin=30;
int BstButtonPin=38;
int DlyButtonPin=36;
int ModButtonPin=32;
int FxButtonPin=34;
int Ch1aButtonPin=23;
int Ch1bButtonPin=24;
int Ch2aButtonPin=26;
int Ch2bButtonPin=28;

//LEDPins
int RvbLED=49;
int BstLED=45;
int DlyLED=46;
int ModLED=48;
int FxLED=47;
int Ch1aLED=53;
int Ch1bLED=52;
int Ch2aLED=51;
int Ch2bLED=50;

//ButtonNewOld to detect presses
int RvbButtonNew;
int RvbButtonOld=1;
int BstButtonNew;
int BstButtonOld=1;
int DlyButtonNew;
int DlyButtonOld=1;
int ModButtonNew;
int ModButtonOld=1;
int FxButtonNew;
int FxButtonOld=1;
int Ch1aButtonNew;
int Ch1aButtonOld=1;
int Ch1bButtonNew;
int Ch1bButtonOld=1;
int Ch2aButtonNew;
int Ch2aButtonOld=1;
int Ch2bButtonNew;
int Ch2bButtonOld=1;

//ToggleStates to determine if effect/ch is on or off
int RvbState=0;
int BstState=0;
int DlyState=0;
int ModState=0;
int FxState=0;
int Ch1aState=0;
int Ch1bState=0;
int Ch2aState=0;
int Ch2bState=0;

//SysEx Address+Data+Chksm+Footer

//PROBLEM HERE

String Ch1aSysEx="F0 41 00 00 00 00 33 12 00 01 00 00 00 01 7E F7";
String Ch1bSysEx="F0 41 00 00 00 00 33 12 00 01 00 00 00 05 7A F7";
String Ch2aSysEx="F0 41 00 00 00 00 33 12 00 01 00 00 00 02 7D F7";
String Ch2bSysEx="F0 41 00 00 00 00 33 12 00 01 00 00 00 06 79 F7";
String RvbOnSysEx="F0 41 00 00 00 00 33 12 60 00 05 40 01 5A F7";
String RvbOffSysEx="F0 41 00 00 00 00 33 12 60 00 05 40 00 5B F7";
String BstOnSysEx="F0 41 00 00 00 00 33 12 60 00 00 10 01 0F F7";
String BstOffSysEx="F0 41 00 00 00 00 33 12 60 00 00 10 00 10 F7";
String DlyOnSysEx="F0 41 00 00 00 00 33 12 60 00 05 00 01 1A F7";
String DlyOffSysEx="F0 41 00 00 00 00 33 12 60 00 05 00 00 1B F7";
String ModOnSysEx="F0 41 00 00 00 00 33 12 60 00 01 00 01 1E F7";
String ModOffSysEx="F0 41 00 00 00 00 33 12 60 00 01 00 00 1F F7";
String FxOnSysEx="F0 41 00 00 00 00 33 12 60 00 03 00 01 1C F7";
String FxOffSysEx="F0 41 00 00 00 00 33 12 60 00 03 00 00 1D F7";

//DebugSysEx
/*
String RvbOnSysEx="y";
String RvbOffSysEx="n";
String BstOnSysEx="y";
String BstOffSysEx="n";
String DlyOnSysEx="y";
String DlyOffSysEx="n";
String ModOnSysEx="y";
String ModOffSysEx="n";
String FxOnSysEx="y";
String FxOffSysEx="n";
String Ch1aSysEx = "1";
String Ch1bSysEx = "2";
String Ch2aSysEx = "3";
String Ch2bSysEx = "4";
*/

//Top strings for LCD Display on footswitch press
//Also sent to Serial for debugging
String Rvb="Not Set";
String Bst="Not Set";
String Dly="Not Set";
String Mod="Not Set";
String Fx="Not Set";
String curAmpChan = "Not Set";

//Botton strings for LCD Display on toggles (shorthand)
String RvbLcdState="R: ";
String BstLcdState="B: ";
String DlyLcdState="D: ";
String ModLcdState="M: ";
String FxLcdState="F: ";

//Variables to store serial reads during setup
String SetupRvb="";
String SetupBst="";
String SetupDly="";
String SetupMod="";
String SetupFx="";
String SetupAmpCh = "";




void setup() {

  //LED TEST

  digitalWrite(Ch1aLED, HIGH);
  delay(100);
  digitalWrite(Ch1aLED, HIGH);
  delay(100);
  digitalWrite(Ch1bLED, HIGH);
  delay(100);
  digitalWrite(Ch2aLED, HIGH);
  delay(100);
  digitalWrite(Ch2bLED, HIGH);
  delay(100);
  digitalWrite(RvbLED, HIGH);
  delay(100);
  digitalWrite(ModLED, HIGH);
  delay(100);
  digitalWrite(FxLED, HIGH);
  delay(100);
  digitalWrite(DlyLED, HIGH);
  delay(100);
  digitalWrite(BstLED, HIGH);
  delay(100);
 
   digitalWrite(Ch1aLED, LOW);
  delay(100);
  digitalWrite(Ch1aLED, LOW);
  delay(100);
  digitalWrite(Ch1bLED, LOW);
  delay(100);
  digitalWrite(Ch2aLED, LOW);
  delay(100);
  digitalWrite(Ch2bLED, LOW);
  delay(100);
  digitalWrite(RvbLED, LOW);
  delay(100);
  digitalWrite(ModLED, LOW);
  delay(100);
  digitalWrite(FxLED, LOW);
  delay(100);
  digitalWrite(DlyLED, LOW);
  delay(100);
  digitalWrite(BstLED, LOW);
  delay(100);

 
//Start serial
Serial.begin(9600);
//Start LCD and delay
lcd.begin(16, 2);
lcd.print("Please Wait...");
delay(1000);
//Set buttons as inputs
pinMode(RvbButtonPin, INPUT);
pinMode(BstButtonPin, INPUT);
pinMode(DlyButtonPin, INPUT);
pinMode(ModButtonPin, INPUT);
pinMode(FxButtonPin, INPUT);
pinMode(Ch1aButtonPin, INPUT);
pinMode(Ch1bButtonPin, INPUT);
pinMode(Ch2aButtonPin, INPUT);
pinMode(Ch2bButtonPin, INPUT);


 
//Start of amp to floorboard sync
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Open Up The");
lcd.setCursor(0, 1);
lcd.print("Serial Monitor");
 
// Request channel from amp
 
Serial.println("Pretend you are the Katana..."); //Debug
Serial.println("Send current channel state as SysEx:"); //Debug

  while (Serial.available()==0) {
}
 
SetupAmpCh = Serial.readString();
 
  if (SetupAmpCh==Ch1aSysEx){
    digitalWrite(Ch1aLED, HIGH);
    digitalWrite(Ch1bLED, LOW);
    digitalWrite(Ch2aLED, LOW);
    digitalWrite(Ch2bLED, LOW);
    Ch1aState=1;
  Ch1bState=0;
    Ch2aState=0;
    Ch2bState=0;
  curAmpChan="Ch1a";
  }
  if (SetupAmpCh==Ch1bSysEx){
    digitalWrite(Ch1aLED, LOW);
    digitalWrite(Ch1bLED, HIGH);
    digitalWrite(Ch2aLED, LOW);
    digitalWrite(Ch2bLED, LOW);
    Ch1aState=0;
  Ch1bState=1;
    Ch2aState=0;
    Ch2bState=0;
  curAmpChan="Ch1b";
  }
  if (SetupAmpCh==Ch2aSysEx){
    digitalWrite(Ch1aLED, LOW);
    digitalWrite(Ch1bLED, LOW);
    digitalWrite(Ch2aLED, HIGH);
    digitalWrite(Ch2bLED, LOW);
    Ch1aState=0;
  Ch1bState=0;
    Ch2aState=1;
    Ch2bState=0;
  curAmpChan="Ch2a";
  }
  if (SetupAmpCh==Ch2bSysEx){
    digitalWrite(Ch1aLED, LOW);
    digitalWrite(Ch1bLED, LOW);
    digitalWrite(Ch2aLED, LOW);
    digitalWrite(Ch2bLED, HIGH);
    Ch1aState=0;
  Ch1bState=0;
    Ch2aState=0;
    Ch2bState=1;
  curAmpChan="Ch2b";
  }
Serial.println(curAmpChan); //Debug
Serial.println(); //Debug
 
     
//Request reverb state from ampp
Serial.println("Pretend you are the Katana..."); //Debug
Serial.println("Send current Reverb state as SysEx:"); //Debug

  while (Serial.available()==0) {
}
 
SetupRvb = Serial.readString();
 
if (SetupRvb==RvbOnSysEx){
    digitalWrite(RvbLED, HIGH);
    RvbState=1;
  RvbLcdState="R+ ";
    Rvb="Rvb: On";   
}
if (SetupRvb==RvbOffSysEx){
    digitalWrite(RvbLED, LOW);
    RvbState=0;
  RvbLcdState="R- ";
    Rvb="Rvb: Off";
}
 
Serial.println(Rvb); //Debug
Serial.println(); //Debug

//Request modulation state from amp
Serial.println("Pretend you are the Katana..."); //Debug
Serial.println("Send current Modulation state as SysEx:"); //Debug

  while (Serial.available()==0) {
}
 
SetupMod = Serial.readString();
 
if (SetupMod==ModOnSysEx){
    digitalWrite(ModLED, HIGH);
    ModState=1;
  ModLcdState="M+ ";
    Mod="Mod: On";   
}
if (SetupMod==ModOffSysEx){
    digitalWrite(ModLED, LOW);
    ModState=0;
  ModLcdState="M- ";
    Mod="Mod: Off";
}
 
Serial.println(Mod); //Debug
Serial.println(); //Debug


//Request FX state from amp
Serial.println("Pretend you are the Katana..."); //Debug
Serial.println("Send current Fx state as SysEx:"); //Debug

  while (Serial.available()==0) {
}
 
SetupFx = Serial.readString();
 
if (SetupFx==FxOnSysEx){
    digitalWrite(FxLED, HIGH);
    FxState=1;
  FxLcdState="F+ ";
    Fx="Fx: On";   
}
if (SetupFx==FxOffSysEx){
    digitalWrite(FxLED, LOW);
    FxState=0;
  FxLcdState="F- ";
    Fx="Fx: Off";
}

Serial.println(Fx); //Debug
Serial.println(); //Debug

//Request delay state from amp 
Serial.println("Pretend you are the Katana..."); //Debug
Serial.println("Send current Delay state as SysEx:"); //Debug

  while (Serial.available()==0) {
}
 
SetupDly = Serial.readString();
 
if (SetupDly==DlyOnSysEx){
    digitalWrite(DlyLED, HIGH);
    DlyState=1;
  DlyLcdState="D+ ";
    Dly="Dly: On";   
}
if (SetupDly==DlyOffSysEx){
    digitalWrite(DlyLED, LOW);
    DlyState=0;
  DlyLcdState="D- ";
    Dly="Dly: Off";
}
 
Serial.println(Dly); //Debug
Serial.println(); //Debug
 
//Request boost state from amp
Serial.println("Pretend you are the Katana..."); //Debug
Serial.println("Send current Boost state as SysEx:"); //Debug
 
  while (Serial.available()==0) {
}
 
SetupBst = Serial.readString();
 
if (SetupBst==BstOnSysEx){
    digitalWrite(BstLED, HIGH);
    BstState=1;
  BstLcdState="B+ ";
    Bst="Bst: On";   
}
if (SetupBst==BstOffSysEx){
    digitalWrite(BstLED, LOW);
    BstState=0;
  BstLcdState="B- ";
    Bst="Bst: Off";
}
 
Serial.println(Bst); //Debug
Serial.println(); //Debug
 
lcd.clear();
lcd.print("Setup Complete!");
Serial.print("Setup Complete!"); //Debug
delay(3000);
lcd.clear();
 
//  pixels.begin();
}



void loop() {
   
//Toggle RVB
RvbButtonNew=digitalRead(RvbButtonPin);
if(RvbButtonOld==0 && RvbButtonNew==1){
  if (RvbState==0){
    digitalWrite(RvbLED, HIGH);
    RvbState=1;
  RvbLcdState="R+ ";
    Rvb = "RVB: On";
    Serial.println(Rvb); //Debug
    Serial.println(RvbOnSysEx); //Debug
    lcd.clear();
    lcd.print(Rvb);
  LoopCount=0;
  delay(dt);
  }
  else{
    digitalWrite(RvbLED, LOW);
    RvbState=0;
  RvbLcdState="R- ";
    Rvb = "RVB: Off";
    Serial.println(Rvb); //Debug
  Serial.println(RvbOffSysEx); //Debug
    lcd.clear();
    lcd.print(Rvb);
  LoopCount=0;
  delay(dt);
  }
}
RvbButtonOld=RvbButtonNew;
   
//Toggle Bst
BstButtonNew=digitalRead(BstButtonPin);
if(BstButtonOld==0 && BstButtonNew==1){
  if (BstState==0){
    digitalWrite(BstLED, HIGH);
    BstState=1;
  BstLcdState="B+ ";
    Bst = "Bst: On";
    Serial.println(Bst); //Debug
  Serial.println(BstOnSysEx); //Debug
    lcd.clear();
    lcd.print(Bst);
  LoopCount=0;
  delay(dt);
  }
  else{
    digitalWrite(BstLED, LOW);
    BstState=0;
  BstLcdState="B- ";
    Bst = "Bst: Off";
    Serial.println(Bst); //Debug
  Serial.println(BstOffSysEx); //Debug
    lcd.clear();
    lcd.print(Bst);
  LoopCount=0;
  delay(dt);
  }
}
BstButtonOld=BstButtonNew;

 
   
//Toggle Dly
DlyButtonNew=digitalRead(DlyButtonPin);
if(DlyButtonOld==0 && DlyButtonNew==1){
  if (DlyState==0){
    digitalWrite(DlyLED, HIGH);
    DlyState=1;
  DlyLcdState="D+ ";
    Dly = "Dly: On";
    Serial.println(Dly); //Debug
  Serial.println(DlyOnSysEx); //Debug
    lcd.clear();
    lcd.print(Dly);
  LoopCount=0;
  delay(dt);
  }
  else{
    digitalWrite(DlyLED, LOW);
    DlyState=0;
  DlyLcdState="D- ";
    Dly = "Dly: Off";
    Serial.println(Dly); //Debug
  Serial.println(DlyOffSysEx); //Debug
    lcd.clear();
    lcd.print(Dly);
  LoopCount=0;
  delay(dt);
  }
}
DlyButtonOld=DlyButtonNew;

 
//Toggle Mod
ModButtonNew=digitalRead(ModButtonPin);
if(ModButtonOld==0 && ModButtonNew==1){
  if (ModState==0){
    digitalWrite(ModLED, HIGH);
    ModState=1;
  ModLcdState="M+ ";
    Mod = "Mod: On";
    Serial.println(Mod); //Debug
    Serial.println(ModOnSysEx); //Debug
    lcd.clear();
    lcd.print(Mod);
  LoopCount=0;
  delay(dt);
  }
  else{
    digitalWrite(ModLED, LOW);
    ModState=0;
  ModLcdState="M- ";
    Mod = "Mod: Off";
    Serial.println(Mod); //Debug
  Serial.println(ModOffSysEx); //Debug
    lcd.clear();
    lcd.print(Mod);
  LoopCount=0;
  delay(dt);
  }
}
ModButtonOld=ModButtonNew;


//Toggle Fx
FxButtonNew=digitalRead(FxButtonPin);
if(FxButtonOld==0 && FxButtonNew==1){
  if (FxState==0){
    digitalWrite(FxLED, HIGH);
    FxState=1;
  FxLcdState="F+ ";
    Fx = "Fx: On";
    Serial.println(Fx); //Debug
  Serial.println(FxOnSysEx); //Debug
    lcd.clear();
    lcd.print(Fx);
  LoopCount=0;
  delay(dt);
  }
  else{
    digitalWrite(FxLED, LOW);
    FxState=0;
    Fx = "Fx: Off";
  FxLcdState="F- ";
    Serial.println(Fx); //Debug
  Serial.println(FxOffSysEx); //Debug
    lcd.clear();
    lcd.print(Fx);
    LoopCount=0;
  delay(dt);
  }
}
FxButtonOld=FxButtonNew;


//Toggle Ch1a
 
Ch1aButtonNew=digitalRead(Ch1aButtonPin);
 
if(Ch1aButtonOld==0 && Ch1aButtonNew==1){
  if (Ch1aState==0){
    digitalWrite(Ch1aLED, HIGH);
    digitalWrite(Ch1bLED, LOW);
    digitalWrite(Ch2aLED, LOW);
    digitalWrite(Ch2bLED, LOW);
    Ch1aState=1;
    Ch1bState=0;
    Ch2aState=0;
    Ch2bState=0;
    Serial.println(curAmpChan); //Debug
    Serial.println(Ch1aSysEx); //Debug
  curAmpChan="Ch1a";
    lcd.clear();
    lcd.print(curAmpChan);
    LoopCount=0;
  delay(dt);
  }
}
Ch1aButtonOld=Ch1aButtonNew;

  //Toggle Ch1b
 
Ch1bButtonNew=digitalRead(Ch1bButtonPin);
 
if(Ch1bButtonOld==0 && Ch1bButtonNew==1){
  if (Ch1bState==0){
    digitalWrite(Ch1aLED, LOW);
    digitalWrite(Ch1bLED, HIGH);
    digitalWrite(Ch2aLED, LOW);
    digitalWrite(Ch2bLED, LOW);
    Ch1aState=0;
    Ch1bState=1;
    Ch2aState=0;
    Ch2bState=0;
    Serial.println(curAmpChan); //Debug
    Serial.println(Ch1bSysEx); //Debug
  curAmpChan="Ch1b";
    lcd.clear();
    lcd.print(curAmpChan);
    LoopCount=0;
  delay(dt);
  }

}
Ch1bButtonOld=Ch1bButtonNew;

  //Toggle Ch2a
 
Ch2aButtonNew=digitalRead(Ch2aButtonPin);
 
if(Ch2aButtonOld==0 && Ch2aButtonNew==1){
  if (Ch2aState==0){
    digitalWrite(Ch1aLED, LOW);
    digitalWrite(Ch1bLED, LOW);
    digitalWrite(Ch2aLED, HIGH);
    digitalWrite(Ch2bLED, LOW);
    Ch1aState=0;
    Ch1bState=0;
    Ch2aState=1;
    Ch2bState=0;
    Serial.println(curAmpChan); //Debug
    Serial.println(Ch2aSysEx); //Debug
  curAmpChan="Ch2a";
    lcd.clear();
    lcd.print(curAmpChan);
    LoopCount=0;
  delay(dt);
  }
}
Ch2aButtonOld=Ch2aButtonNew;

  //Toggle Ch2b
 
Ch2bButtonNew=digitalRead(Ch2bButtonPin);
 
if(Ch2bButtonOld==0 && Ch2bButtonNew==1){
  if (Ch2bState==0){
    digitalWrite(Ch1aLED, LOW);
    digitalWrite(Ch1bLED, LOW);
    digitalWrite(Ch2aLED, LOW);
    digitalWrite(Ch2bLED, HIGH);
    Ch1aState=0;
    Ch1bState=0;
    Ch2aState=0;
    Ch2bState=1;
    Serial.println(curAmpChan); //Debug
    Serial.println(Ch2bSysEx); //Debug
  curAmpChan="Ch2b";
    lcd.clear();
    lcd.print(curAmpChan);
    LoopCount=0;
  delay(dt);
  }
}
Ch2bButtonOld=Ch2bButtonNew;
 

// Starts LoopCount - Shows current effects
// Loop count resets every time a toggle is thrown
 
LoopCount=LoopCount+1;
  if(LoopCount==lcdTimeout){ // If LCD allows and doesn't flash too much then swap == for !=
    lcd.clear();
  lcd.setCursor(0, 0);
    lcd.print(curAmpChan);
    lcd.setCursor(0, 1);
    lcdFXCurrent=(RvbLcdState+ModLcdState+FxLcdState+DlyLcdState+BstLcdState);
    lcd.print(lcdFXCurrent);
  lcd.setCursor(0, 0);
    LoopCount=0;
  }


 
}


The latest version on TinkerCAD shows the LCD working: (and I've written that one for the NeoPixels we'll have later too)
https://www.tinkercad.com/things/eaRIe0fvAFL-footswitch-wip/

Note that that the circuit image from TinkerCAD below matches the TinkerCAD circuit in the link above ^ and not the real Arduino/code in the video.

StevenMartin

Does anyone know if it's possible to control the EXP effects over USB as well? Are there any examples of this working anywhere?

In my mind I can connect the 5V and ground to the TRS jack on a Wah pedal and use an analog read input on the Arduino to map the internal pot position. Then send the mapped data in real-time over USB to the Katana to control expression effects.

Does anyone know of a reason this wouldn't work?

admin

Quote from: StevenMartin on February 17, 2020, 07:17:59 AM
Does anyone know if it's possible to control the EXP effects over USB as well? Are there any examples of this working anywhere?

In my mind I can connect the 5V and ground to the TRS jack on a Wah pedal and use an analog read input on the Arduino to map the internal pot position. Then send the mapped data in real-time over USB to the Katana to control expression effects.

Does anyone know of a reason this wouldn't work?

Primovasound MIDX-20 does it
http://www.primovasound.com/midx_20_page2.html
http://www.primovasound.com/pdf/MIDX_20_KatanaMKIIV1.pdf

StevenMartin

Then we know it's possible. Awesome thanks! Looks like the VController is doing this too. Looks like there might be a little latency involved though.

CodeSmart

Quote from: StevenMartin on February 17, 2020, 07:48:28 AM
Then we know it's possible. Awesome thanks! Looks like the VController is doing this too. Looks like there might be a little latency involved though.
Plugging a EV-5 into MIDX-20 controlling a parameter renders a latency the human body don't feel. Feels instant.
But I got more gear than I need...and I like it!

StevenMartin


gumtown

In SteveO's Katana controller code in GIT HUB there are some routines for EXP pedal input, and code for auto calibration of the pedal range.
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

StevenMartin

Cheers Gumtown I'll check it out. I must say, the previous posts and everyone on VGuitar have been very helpful. Glad I found the community.

StevenMartin

Are there any resources for wiring up the USB Mini Shield to the Arduino Mega? I'm currently working from this pinout: https://luckyretail.com/Uploadfile/201811252/186971/186971-3.jpg
I believe this will prove key as well to get the mini shield working: https://github.com/felis/USB_Host_Shield_2.0/

After some basic looking up on SPI and USB (although still very new to it) and also looking here: https://www.arduino.cc/en/reference/SPI it looks like I need:

Slave Select to 53 on the Mega, Serial Clock to 52, Master Out Slave in to 51, Master In Slave Out to 50. Then connect both Grounds to Ground and 3.3v to 3.3v.

This example: https://github.com/SteveObert/KatanaUSB_Midi_controller/blob/master/Fritzing/wiring.png uses an interrupt pin, and connects the reset to 3.3v as well. Do I need those for my application? Will any digital pin work for the Int?

Possibly a stupid question but if the Mega is sending 5v over the 50-53pins, and the USB Mini shield is requiring 3.3v won't that potentially fry the sheild?




StevenMartin

Here's how what I'm working from; https://luckyretail.com/Uploadfile/201811252/186971/186971-3.jpg

I've connected
SS to 53 on the Mega 2560...
MOSI to 51 on the Mega...
MISO to 50
SCK to 52
INT to 9
3.3 to 3.3V
Both GNDs to GND
RESET to 3.3v (As advised elsewhere)...

I don't have anything plugged into the USB port of the mini Host Sheild

I'm running the board_qc. example from here: https://github.com/felis/USB_Host_Shield_2.0/

And getting this output:


Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision invalid. Value returned: 00
Unrecoverable error - test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test




If I swap SS to pin 10 on the Mega I get


Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K
Test failed.  Value written: 01 read: 00
Unrecoverable error - test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test


Any ideas folks?



[UPDATE]... Following some more suggestions I found elsewhere


If I plug SS to Pin 10 and RESET to pin 7 and add this into the void Setup()

pinMode( 7, OUTPUT);  // MAX3421E RESET pin
digitalWrite(7, 1);
digitalWrite(7, 0);
delay(10);
digitalWrite(7, 1); // reset


I get:


Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K................ SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue...


I've seen somewhere to just send any keypress after this and then I get the following:


Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K................ SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue...
GPIO test passed.
PLL test. 100 chip resets will be performed
Resetting oscillator

Reset number 0 Time to stabilize - 314 cycles

Reset number 1 Time to stabilize - 314 cycles

Reset number 2 Time to stabilize - 314 cycles

Reset number 3 Time to stabilize - 314 cycles

Reset number 4 Time to stabilize - 314 cycles

Reset number 5 Time to stabilize - 314 cycles

Reset number 6 Time to stabilize - 314 cycles

Reset number 7 Time to stabilize - 314 cycles

Reset number 8 Time to stabilize - 314 cycles

Reset number 9 Time to stabilize - 314 cycles

Reset number 10 Time to stabilize - 314 cycles

Reset number 11 Time to stabilize - 314 cycles

Reset number 12 Time to stabilize - 314 cycles

Reset number 13 Time to stabilize - 315 cycles

Reset number 14 Time to stabilize - 315 cycles

Reset number 15 Time to stabilize - 315 cycles

Reset number 16 Time to stabilize - 315 cycles

Reset number 17 Time to stabilize - 315 cycles

Reset number 18 Time to stabilize - 314 cycles

Reset number 19 Time to stabilize - 314 cycles

Reset number 20 Time to stabilize - 314 cycles

Reset number 21 Time to stabilize - 314 cycles

Reset number 22 Time to stabilize - 314 cycles

Reset number 23 Time to stabilize - 314 cycles

Reset number 24 Time to stabilize - 314 cycles

Reset number 25 Time to stabilize - 314 cycles

Reset number 26 Time to stabilize - 314 cycles

Reset number 27 Time to stabilize - 314 cycles

Reset number 28 Time to stabilize - 314 cycles

Reset number 29 Time to stabilize - 315 cycles

Reset number 30 Time to stabilize - 315 cycles

Reset number 31 Time to stabilize - 314 cycles

Reset number 32 Time to stabilize - 315 cycles

Reset number 33 Time to stabilize - 314 cycles

Reset number 34 Time to stabilize - 314 cycles

Reset number 35 Time to stabilize - 314 cycles

Reset number 36 Time to stabilize - 314 cycles

Reset number 37 Time to stabilize - 314 cycles

Reset number 38 Time to stabilize - 314 cycles

Reset number 39 Time to stabilize - 314 cycles

Reset number 40 Time to stabilize - 314 cycles

Reset number 41 Time to stabilize - 314 cycles

Reset number 42 Time to stabilize - 314 cycles

Reset number 43 Time to stabilize - 315 cycles

Reset number 44 Time to stabilize - 315 cycles

Reset number 45 Time to stabilize - 315 cycles

Reset number 46 Time to stabilize - 315 cycles

Reset number 47 Time to stabilize - 315 cycles

Reset number 48 Time to stabilize - 314 cycles

Reset number 49 Time to stabilize - 314 cycles

Reset number 50 Time to stabilize - 314 cycles

Reset number 51 Time to stabilize - 314 cycles

Reset number 52 Time to stabilize - 314 cycles

Reset number 53 Time to stabilize - 314 cycles

Reset number 54 Time to stabilize - 314 cycles

Reset number 55 Time to stabilize - 314 cycles

Reset number 56 Time to stabilize - 314 cycles

Reset number 57 Time to stabilize - 314 cycles

Reset number 58 Time to stabilize - 314 cycles

Reset number 59 Time to stabilize - 314 cycles

Reset number 60 Time to stabilize - 315 cycles

Reset number 61 Time to stabilize - 315 cycles

Reset number 62 Time to stabilize - 315 cycles

Reset number 63 Time to stabilize - 314 cycles

Reset number 64 Time to stabilize - 314 cycles

Reset number 65 Time to stabilize - 314 cycles

Reset number 66 Time to stabilize - 314 cycles

Reset number 67 Time to stabilize - 314 cycles

Reset number 68 Time to stabilize - 314 cycles

Reset number 69 Time to stabilize - 314 cycles

Reset number 70 Time to stabilize - 314 cycles

Reset number 71 Time to stabilize - 314 cycles

Reset number 72 Time to stabilize - 315 cycles

Reset number 73 Time to stabilize - 315 cycles

Reset number 74 Time to stabilize - 315 cycles

Reset number 75 Time to stabilize - 315 cycles

Reset number 76 Time to stabilize - 315 cycles

Reset number 77 Time to stabilize - 314 cycles

Reset number 78 Time to stabilize - 314 cycles

Reset number 79 Time to stabilize - 314 cycles

Reset number 80 Time to stabilize - 314 cycles

Reset number 81 Time to stabilize - 314 cycles

Reset number 82 Time to stabilize - 314 cycles

Reset number 83 Time to stabilize - 314 cycles

Reset number 84 Time to stabilize - 314 cycles

Reset number 85 Time to stabilize - 314 cycles

Reset number 86 Time to stabilize - 314 cycles

Reset number 87 Time to stabilize - 315 cycles

Reset number 88 Time to stabilize - 315 cycles

Reset number 89 Time to stabilize - 315 cycles

Reset number 90 Time to stabilize - 315 cycles

Reset number 91 Time to stabilize - 315 cycles

Reset number 92 Time to stabilize - 314 cycles

Reset number 93 Time to stabilize - 314 cycles

Reset number 94 Time to stabilize - 314 cycles

Reset number 95 Time to stabilize - 314 cycles

Reset number 96 Time to stabilize - 314 cycles

Reset number 97 Time to stabilize - 314 cycles

Reset number 98 Time to stabilize - 314 cycles

Reset number 99 Time to stabilize - 314 cycles

Checking USB device communication.

Waiting for device...



Does this mean it's now working? Is there another test for this?

StevenMartin

If I try and run https://github.com/SteveObert/KatanaUSB_Midi_controller/tree/master/Katana_USB_MIDI_Simple. (Got all the libraries etc)

Same pin setup as the last section of my last post...

(Again I have to add this to void setup as I have RESET in pin7):

pinMode(7, OUTPUT);
digitalWrite(7, 1);
digitalWrite(7, 0);
delay(10);
digitalWrite(7, 1);



I get stuck at
"Waiting...

Katana NOT READY!"  When I have it plugged into the Katana.

I'm assuming then that the USB mini shield is working okay then? Because otherwise, I get stuck at *** USB init error! ****** USB / MS3 init error! ***

It saying Katana NOT READY!"  When I have it plugged into the Katana seems like progress at least.


SteveO

Try running this: https://github.com/SteveObert/KatanaUSB_Midi_controller/tree/master/USBminiBoard_qc to test the USB shield. I think in order for the tests to pass something must be plugged into the port but I can't remember for sure.

StevenMartin

Hey SteveO, really appreciate the response.

So if I run the USBminiBoard_qc 'out the box', with an old PS3 Controller plugged into the USB of the minishield, I get:


Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision invalid. Value returned: 00
SPI long test. Transfers 1MB of data. Each dot is 64K
Test failed.  Value written: 01 read: 00
Unrecoverable error - test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test


If I had the code I mentioned before in the void setup declaring pin7 as an output (where I have RESET connected) and then setting the pin HIGH I get:


Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K................ SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue...
//I pressed any key here
GPIO test passed.
PLL test. 100 chip resets will be performed
Resetting oscillator

Reset number 0 Time to stabilize - 315 cycles

Reset number 1 Time to stabilize - 315 cycles

Reset number 2 Time to stabilize - 314 cycles

Reset number 3 Time to stabilize - 314 cycles

Reset number 4 Time to stabilize - 315 cycles

Reset number 5 Time to stabilize - 314 cycles

Reset number 6 Time to stabilize - 314 cycles

Reset number 7 Time to stabilize - 314 cycles

Reset number 8 Time to stabilize - 314 cycles

Reset number 9 Time to stabilize - 314 cycles

Reset number 10 Time to stabilize - 314 cycles

Reset number 11 Time to stabilize - 315 cycles

Reset number 12 Time to stabilize - 315 cycles

Reset number 13 Time to stabilize - 315 cycles

Reset number 14 Time to stabilize - 315 cycles

Reset number 15 Time to stabilize - 315 cycles

Reset number 16 Time to stabilize - 314 cycles

Reset number 17 Time to stabilize - 314 cycles

Reset number 18 Time to stabilize - 314 cycles

Reset number 19 Time to stabilize - 314 cycles

Reset number 20 Time to stabilize - 314 cycles

Reset number 21 Time to stabilize - 314 cycles

Reset number 22 Time to stabilize - 314 cycles

Reset number 23 Time to stabilize - 314 cycles

Reset number 24 Time to stabilize - 314 cycles

Reset number 25 Time to stabilize - 315 cycles

Reset number 26 Time to stabilize - 315 cycles

Reset number 27 Time to stabilize - 314 cycles

Reset number 28 Time to stabilize - 315 cycles

Reset number 29 Time to stabilize - 315 cycles

Reset number 30 Time to stabilize - 314 cycles

Reset number 31 Time to stabilize - 314 cycles

Reset number 32 Time to stabilize - 314 cycles

Reset number 33 Time to stabilize - 314 cycles

Reset number 34 Time to stabilize - 314 cycles

Reset number 35 Time to stabilize - 314 cycles

Reset number 36 Time to stabilize - 314 cycles

Reset number 37 Time to stabilize - 314 cycles

Reset number 38 Time to stabilize - 314 cycles

Reset number 39 Time to stabilize - 314 cycles

Reset number 40 Time to stabilize - 315 cycles

Reset number 41 Time to stabilize - 315 cycles

Reset number 42 Time to stabilize - 315 cycles

Reset number 43 Time to stabilize - 315 cycles

Reset number 44 Time to stabilize - 315 cycles

Reset number 45 Time to stabilize - 314 cycles

Reset number 46 Time to stabilize - 314 cycles

Reset number 47 Time to stabilize - 314 cycles

Reset number 48 Time to stabilize - 314 cycles

Reset number 49 Time to stabilize - 314 cycles

Reset number 50 Time to stabilize - 314 cycles

Reset number 51 Time to stabilize - 314 cycles

Reset number 52 Time to stabilize - 314 cycles

Reset number 53 Time to stabilize - 314 cycles

Reset number 54 Time to stabilize - 314 cycles

Reset number 55 Time to stabilize - 315 cycles

Reset number 56 Time to stabilize - 315 cycles

Reset number 57 Time to stabilize - 315 cycles

Reset number 58 Time to stabilize - 315 cycles

Reset number 59 Time to stabilize - 315 cycles

Reset number 60 Time to stabilize - 314 cycles

Reset number 61 Time to stabilize - 314 cycles

Reset number 62 Time to stabilize - 314 cycles

Reset number 63 Time to stabilize - 314 cycles

Reset number 64 Time to stabilize - 314 cycles

Reset number 65 Time to stabilize - 314 cycles

Reset number 66 Time to stabilize - 314 cycles

Reset number 67 Time to stabilize - 314 cycles

Reset number 68 Time to stabilize - 314 cycles

Reset number 69 Time to stabilize - 314 cycles

Reset number 70 Time to stabilize - 314 cycles

Reset number 71 Time to stabilize - 315 cycles

Reset number 72 Time to stabilize - 315 cycles

Reset number 73 Time to stabilize - 315 cycles

Reset number 74 Time to stabilize - 315 cycles

Reset number 75 Time to stabilize - 314 cycles

Reset number 76 Time to stabilize - 314 cycles

Reset number 77 Time to stabilize - 314 cycles

Reset number 78 Time to stabilize - 314 cycles

Reset number 79 Time to stabilize - 314 cycles

Reset number 80 Time to stabilize - 314 cycles

Reset number 81 Time to stabilize - 314 cycles

Reset number 82 Time to stabilize - 314 cycles

Reset number 83 Time to stabilize - 314 cycles

Reset number 84 Time to stabilize - 314 cycles

Reset number 85 Time to stabilize - 315 cycles

Reset number 86 Time to stabilize - 315 cycles

Reset number 87 Time to stabilize - 315 cycles

Reset number 88 Time to stabilize - 315 cycles

Reset number 89 Time to stabilize - 315 cycles

Reset number 90 Time to stabilize - 314 cycles

Reset number 91 Time to stabilize - 314 cycles

Reset number 92 Time to stabilize - 314 cycles

Reset number 93 Time to stabilize - 314 cycles

Reset number 94 Time to stabilize - 314 cycles

Reset number 95 Time to stabilize - 314 cycles

Reset number 96 Time to stabilize - 314 cycles

Reset number 97 Time to stabilize - 314 cycles

Reset number 98 Time to stabilize - 314 cycles

Reset number 99 Time to stabilize - 314 cycles

Checking USB device communication.

Waiting for device...


Then we hang on waiting - that's with a PS3 controller connected via USB. I believe I tried the same yesterday with the Katana connected to the mini shield too but I can double-check that if necessary. 

I just keep thinking 'If it's not doing what I expect, and I don't know why, then I don't understand the problem enough'. But I'm starting to run out of rocks to look under.

My main goal here at the moment is to verify that:
1) I soldered the shield correctly
2) The shield is hooked up to the mega correctly
3) The shield hasn't been damaged or fried along the way and is functioning as it should be.

Then I can isolate any future problems to my own code, rather than hardware.

StevenMartin

Right...

I tried something maybe a bit stupid but it's possibly revealed something....

Here's the pinout for the USB Mini Shield: https://luckyretail.com/Uploadfile/201811252/186971/186971-3.jpg

I ran the https://github.com/SteveObert/KatanaUSB_Midi_controller/tree/master/USBminiBoard_qc  test with my phone plugged into the USB of the mini shield...

As before it hangs at "Checking USB device communication. Waiting for device..."

I read something online about a mod you may have to do with this board involving 5v and VBUS (I don't know enough on this so it might take some digging)...

So here's the stupid part... I connected a jumper wire to 5V on the mega... while in the 'waiting for device' if I connect that 5v to the VBUS jumper of the mini shield (see above, its on the top left)... I get nothing... But then if it remove it from VBUS jumper my serial monitor wakes up and the test continues giving me:

Checking USB device communication.

Waiting for device...
Reset complete. Waiting for the first SOF...
Getting device descriptor
Descriptor Length: 12
Descriptor type: 01
USB version: 0210
Device class: 00
Device Subclass: 00
Device Protocol: 00
Max.packet size: 40
Vendor  ID: 18D1
Product ID: 4EE7
Revision ID: 0404
Mfg.string index: 01
Prod.string index: 02
Serial number index: 03
Number of conf.: 01

All tests passed. Press RESET to restart test


If I restart the test (nothing attached to sheild VBUS) I get the same 'waiting for device'.... Until I give a quick 'tap and release' with 5v to the vbus then it completes as above here. Maybe this mod does need doing?

StevenMartin

So as I understand it... The shield is powered by 3.3v, but we make the mod to get 5v going to the USB shield connector powerline. So I've cut where the green line is to break the connection from VBUS... and then soldered connected a header pin to the VBUS pad so I can power that VBUS with 5v from the Mega

Anything funky sounding about doing that? Some info here (on WayBack because circuits at home is bust now): https://web.archive.org/web/20190120133645/https://www.circuitsathome.com/usb-host-shield-hardware-manual/

Also, the attached is a picture of my actual shield before I soldered it. 'Helpfully', it's not identical to the one in the pinout diagram from the seller although it is similar.

If my phone is connected I now pass the test (after pressing any key)....


Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K................ SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue...
GPIO test passed.
PLL test. 100 chip resets will be performed
Resetting oscillator

Reset number 0 Time to stabilize - 314 cycles

Reset number 1 Time to stabilize - 314 cycles

Reset number 2 Time to stabilize - 314 cycles

Reset number 3 Time to stabilize - 314 cycles

Reset number 4 Time to stabilize - 315 cycles

Reset number 5 Time to stabilize - 315 cycles

Reset number 6 Time to stabilize - 314 cycles

Reset number 7 Time to stabilize - 315 cycles

Reset number 8 Time to stabilize - 314 cycles

Reset number 9 Time to stabilize - 315 cycles

Reset number 10 Time to stabilize - 315 cycles

Reset number 11 Time to stabilize - 314 cycles

Reset number 12 Time to stabilize - 314 cycles

Reset number 13 Time to stabilize - 314 cycles

Reset number 14 Time to stabilize - 314 cycles

Reset number 15 Time to stabilize - 314 cycles

Reset number 16 Time to stabilize - 314 cycles

Reset number 17 Time to stabilize - 314 cycles

Reset number 18 Time to stabilize - 314 cycles

Reset number 19 Time to stabilize - 314 cycles

Reset number 20 Time to stabilize - 314 cycles

Reset number 21 Time to stabilize - 315 cycles

Reset number 22 Time to stabilize - 315 cycles

Reset number 23 Time to stabilize - 315 cycles

Reset number 24 Time to stabilize - 315 cycles

Reset number 25 Time to stabilize - 315 cycles

Reset number 26 Time to stabilize - 314 cycles

Reset number 27 Time to stabilize - 314 cycles

Reset number 28 Time to stabilize - 314 cycles

Reset number 29 Time to stabilize - 314 cycles

Reset number 30 Time to stabilize - 314 cycles

Reset number 31 Time to stabilize - 314 cycles

Reset number 32 Time to stabilize - 314 cycles

Reset number 33 Time to stabilize - 314 cycles

Reset number 34 Time to stabilize - 314 cycles

Reset number 35 Time to stabilize - 314 cycles

Reset number 36 Time to stabilize - 315 cycles

Reset number 37 Time to stabilize - 315 cycles

Reset number 38 Time to stabilize - 315 cycles

Reset number 39 Time to stabilize - 314 cycles

Reset number 40 Time to stabilize - 315 cycles

Reset number 41 Time to stabilize - 314 cycles

Reset number 42 Time to stabilize - 314 cycles

Reset number 43 Time to stabilize - 314 cycles

Reset number 44 Time to stabilize - 314 cycles

Reset number 45 Time to stabilize - 314 cycles

Reset number 46 Time to stabilize - 314 cycles

Reset number 47 Time to stabilize - 314 cycles

Reset number 48 Time to stabilize - 314 cycles

Reset number 49 Time to stabilize - 314 cycles

Reset number 50 Time to stabilize - 315 cycles

Reset number 51 Time to stabilize - 315 cycles

Reset number 52 Time to stabilize - 315 cycles

Reset number 53 Time to stabilize - 315 cycles

Reset number 54 Time to stabilize - 315 cycles

Reset number 55 Time to stabilize - 314 cycles

Reset number 56 Time to stabilize - 314 cycles

Reset number 57 Time to stabilize - 314 cycles

Reset number 58 Time to stabilize - 314 cycles

Reset number 59 Time to stabilize - 314 cycles

Reset number 60 Time to stabilize - 314 cycles

Reset number 61 Time to stabilize - 314 cycles

Reset number 62 Time to stabilize - 314 cycles

Reset number 63 Time to stabilize - 314 cycles

Reset number 64 Time to stabilize - 314 cycles

Reset number 65 Time to stabilize - 315 cycles

Reset number 66 Time to stabilize - 315 cycles

Reset number 67 Time to stabilize - 315 cycles

Reset number 68 Time to stabilize - 314 cycles

Reset number 69 Time to stabilize - 314 cycles

Reset number 70 Time to stabilize - 314 cycles

Reset number 71 Time to stabilize - 314 cycles

Reset number 72 Time to stabilize - 314 cycles

Reset number 73 Time to stabilize - 314 cycles

Reset number 74 Time to stabilize - 314 cycles

Reset number 75 Time to stabilize - 314 cycles

Reset number 76 Time to stabilize - 314 cycles

Reset number 77 Time to stabilize - 314 cycles

Reset number 78 Time to stabilize - 314 cycles

Reset number 79 Time to stabilize - 314 cycles

Reset number 80 Time to stabilize - 315 cycles

Reset number 81 Time to stabilize - 314 cycles

Reset number 82 Time to stabilize - 315 cycles

Reset number 83 Time to stabilize - 315 cycles

Reset number 84 Time to stabilize - 315 cycles

Reset number 85 Time to stabilize - 314 cycles

Reset number 86 Time to stabilize - 314 cycles

Reset number 87 Time to stabilize - 314 cycles

Reset number 88 Time to stabilize - 314 cycles

Reset number 89 Time to stabilize - 314 cycles

Reset number 90 Time to stabilize - 314 cycles

Reset number 91 Time to stabilize - 314 cycles

Reset number 92 Time to stabilize - 314 cycles

Reset number 93 Time to stabilize - 314 cycles

Reset number 94 Time to stabilize - 314 cycles

Reset number 95 Time to stabilize - 314 cycles

Reset number 96 Time to stabilize - 315 cycles

Reset number 97 Time to stabilize - 315 cycles

Reset number 98 Time to stabilize - 315 cycles

Reset number 99 Time to stabilize - 315 cycles

Checking USB device communication.

Reset complete. Waiting for the first SOF...
Getting device descriptor
Descriptor Length: 12
Descriptor type: 01
USB version: 0210
Device class: 00
Device Subclass: 00
Device Protocol: 00
Max.packet size: 40
Vendor  ID: 18D1
Product ID: 4EE7
Revision ID: 0404
Mfg.string index: 01
Prod.string index: 02
Serial number index: 03
Number of conf.: 01

All tests passed. Press RESET to restart test


But then swapping my phone out for the Katana hangs as waiting for device. And also running the Katana_USB_MIDI_Simple with the katana attached still now hangs at Katana Not Ready

Bauerbyter

Sorry I didnt get notification for that thread.
I dont really get excatly whats going on, can you show me pic and/or a schematic of your stuff?

I get it right you are using an Mega2560 and this small breakout board? The output of the your Code looks like there is a communication problem.


StevenMartin

Hey Bauerbyter! Thanks for dropping back in!

Excuse my photoshop rats nest (and typo filename. I can spell diagram, I promise 😅) but hopefully, this is clear enough:


StevenMartin

Using the above wiring... If I run the 'board_qc' mentioned before, and I ask the Mega to Serial.print SS, MOSI, MISO and SCK it gives me:

SS: 53

MOSI: 51

MISO: 50

SCK: 52

Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K................ SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue...
GPIO test passed.
PLL test. 100 chip resets will be performed
Resetting oscillator

Reset number 0 Time to stabilize - 315 cycles

Reset number 1 Time to stabilize - 315 cycles

Reset number 2 Time to stabilize - 315 cycles

Reset number 3 Time to stabilize - 314 cycles

Reset number 4 Time to stabilize - 315 cycles

Reset number 5 Time to stabilize - 315 cycles

Reset number 6 Time to stabilize - 314 cycles

Reset number 7 Time to stabilize - 315 cycles

Reset number 8 Time to stabilize - 314 cycles

Reset number 9 Time to stabilize - 314 cycles

Reset number 10 Time to stabilize - 314 cycles

Reset number 11 Time to stabilize - 315 cycles

Reset number 12 Time to stabilize - 315 cycles

Reset number 13 Time to stabilize - 315 cycles

Reset number 14 Time to stabilize - 315 cycles

Reset number 15 Time to stabilize - 314 cycles

Reset number 16 Time to stabilize - 314 cycles

Reset number 17 Time to stabilize - 314 cycles

Reset number 18 Time to stabilize - 314 cycles

Reset number 19 Time to stabilize - 314 cycles

Reset number 20 Time to stabilize - 314 cycles

Reset number 21 Time to stabilize - 314 cycles

Reset number 22 Time to stabilize - 314 cycles

Reset number 23 Time to stabilize - 314 cycles

Reset number 24 Time to stabilize - 314 cycles

Reset number 25 Time to stabilize - 315 cycles

Reset number 26 Time to stabilize - 314 cycles

Reset number 27 Time to stabilize - 315 cycles

Reset number 28 Time to stabilize - 314 cycles

Reset number 29 Time to stabilize - 315 cycles

Reset number 30 Time to stabilize - 314 cycles

Reset number 31 Time to stabilize - 314 cycles

Reset number 32 Time to stabilize - 314 cycles

Reset number 33 Time to stabilize - 314 cycles

Reset number 34 Time to stabilize - 314 cycles

Reset number 35 Time to stabilize - 314 cycles

Reset number 36 Time to stabilize - 314 cycles

Reset number 37 Time to stabilize - 314 cycles

Reset number 38 Time to stabilize - 314 cycles

Reset number 39 Time to stabilize - 314 cycles

Reset number 40 Time to stabilize - 315 cycles

Reset number 41 Time to stabilize - 315 cycles

Reset number 42 Time to stabilize - 315 cycles

Reset number 43 Time to stabilize - 315 cycles

Reset number 44 Time to stabilize - 315 cycles

Reset number 45 Time to stabilize - 314 cycles

Reset number 46 Time to stabilize - 314 cycles

Reset number 47 Time to stabilize - 314 cycles

Reset number 48 Time to stabilize - 314 cycles

Reset number 49 Time to stabilize - 314 cycles

Reset number 50 Time to stabilize - 314 cycles

Reset number 51 Time to stabilize - 314 cycles

Reset number 52 Time to stabilize - 314 cycles

Reset number 53 Time to stabilize - 314 cycles

Reset number 54 Time to stabilize - 315 cycles

Reset number 55 Time to stabilize - 314 cycles

Reset number 56 Time to stabilize - 315 cycles

Reset number 57 Time to stabilize - 315 cycles

Reset number 58 Time to stabilize - 315 cycles

Reset number 59 Time to stabilize - 314 cycles

Reset number 60 Time to stabilize - 314 cycles

Reset number 61 Time to stabilize - 314 cycles

Reset number 62 Time to stabilize - 314 cycles

Reset number 63 Time to stabilize - 314 cycles

Reset number 64 Time to stabilize - 314 cycles

Reset number 65 Time to stabilize - 314 cycles

Reset number 66 Time to stabilize - 314 cycles

Reset number 67 Time to stabilize - 314 cycles

Reset number 68 Time to stabilize - 314 cycles

Reset number 69 Time to stabilize - 315 cycles

Reset number 70 Time to stabilize - 315 cycles

Reset number 71 Time to stabilize - 315 cycles

Reset number 72 Time to stabilize - 315 cycles

Reset number 73 Time to stabilize - 315 cycles

Reset number 74 Time to stabilize - 314 cycles

Reset number 75 Time to stabilize - 314 cycles

Reset number 76 Time to stabilize - 314 cycles

Reset number 77 Time to stabilize - 314 cycles

Reset number 78 Time to stabilize - 314 cycles

Reset number 79 Time to stabilize - 314 cycles

Reset number 80 Time to stabilize - 314 cycles

Reset number 81 Time to stabilize - 314 cycles

Reset number 82 Time to stabilize - 314 cycles

Reset number 83 Time to stabilize - 314 cycles

Reset number 84 Time to stabilize - 315 cycles

Reset number 85 Time to stabilize - 315 cycles

Reset number 86 Time to stabilize - 315 cycles

Reset number 87 Time to stabilize - 315 cycles

Reset number 88 Time to stabilize - 315 cycles

Reset number 89 Time to stabilize - 314 cycles

Reset number 90 Time to stabilize - 314 cycles

Reset number 91 Time to stabilize - 314 cycles

Reset number 92 Time to stabilize - 314 cycles

Reset number 93 Time to stabilize - 314 cycles

Reset number 94 Time to stabilize - 314 cycles

Reset number 95 Time to stabilize - 314 cycles

Reset number 96 Time to stabilize - 314 cycles

Reset number 97 Time to stabilize - 314 cycles

Reset number 98 Time to stabilize - 314 cycles

Reset number 99 Time to stabilize - 315 cycles

Checking USB device communication.

Waiting for device...


Which doesn't make sense...Because I seem to be getting further using D10 as SS... Not D53... 

If I keep the same wiring as in the image above but now swap SS into 53 I get:


SS: 53

MOSI: 51

MISO: 50

SCK: 52

Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision invalid. Value returned: 00
Unrecoverable error - test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test


So maybe there's some pin declarations going wrong somewhere. I wonder if this is because I'm using a Elegoo rather than an official.

Bauerbyter

First of all, you know that you dont have to connect two GND? one is enough :-)

So I went through all the pins and looked at the specs but I didnt see any wrong connections. I Would stay with D10 (I also use this on Mega).
Your first output (on last posted) looked pretty good. Everything worked but he dont find an USB Device. (you connected one to the usb host ?)
Maybe try my code... but you have to install platform.io to get my code running. (VS Code with Platformio)


StevenMartin

I've installed VSCode and Platformio and run your code from GitHub with the above pin setup.
I was getting: *** USB init error! ****** USB / Katana init error! ***

So I declared pin7 (RST) as output and set it high, then I'm getting:
"Katana OFFLINE !"

(The Katana is on and plugged into the USB Mini Shield). I can control the Katana from the same cable and a Mac in Boss BTS, so the cable and the Katana itself are good.