Daco MG13 Control Grip with Uno r# and USB Shield

I have a Daco MG13 control grip, 3 buttons and a HAT. I have it connected to a USB Shield, on an Arduino Uno R3 board.

I am a bit of a noob, but understand programming a bit.

I have spent weeks now trying to get this working, I must be missing the forest for the trees at this point.

An example of what I want to do is:

  • Pull and hold trigger, close circuit on pin X (will be used to activate a radio for communication on an aircraft)
  • Release trigger, open circuit

Easy enough I would have thought. If I can get this going, I'll be able to figure out all the rest of the buttons. I just can't figure out how to capture that trigger press and translate it into a "button press" over USB.

Any help would be appreciated, and without the lame go watch this Youtube video or read this Arduino doc (unless you have a good one, I haven't been able to find it).

Much appreciated for any help, I really just must be overly frustrated and can't see the solution.

Cheers!

I used DuckDuckGo and got this on the first hit, hopefully it helps you. I do not have one so I am assuming this is correct.

Get a copy of the Arduino Cookbook and go through it cover to cover and stop on anything interesting.

Yeah, I have that too. My issue is that I can't figure out how to capture the button presses via the USB Shield. I am sure this is super easy, and I think I got the Uno to recognize the controller through the following as I get the "USB Host initialized" msg:

void setup() {
  //Initialize serial interface
  Serial.begin(115200);
  
  if (Usb.Init() ==-1) {
    Serial.println("Could not initialize USB Host.");
    while(1);
  }
  else
  {
    Serial.println("USB Host initialized!");
 }

My issue is after. My latest attempt looks like this:

void loop() {
  Usb.Task();

  //Read Joystick values
     if (Serial.available()){
      char input = Serial.read();
           switch (input) {
        case 'A0':  //Left button
          Serial.println("Left button");
          break;
        case 'A1':  //Hat up
          Serial.println("Left button");
          break;
        case 'A2':  //Hat down
          Serial.println("Left button");
          break;
        case 'A3':  //Hat left
          Serial.println("Left button");
          break;
        case 'A4':  //Hat right
          Serial.println("Left button");
          break;
        case 'A5':  //Right button
          Serial.println("Left button");
          break;
        case 'A6':  //Trigger
          Serial.println("Left button");
          break;  
      }
    }
  }

I am thinking that USB is digital, so the serial won't work (or I have no clue what I am talking about)...

I feel this is so easy, and I'm going to bang my head when I get it, but...

Hi, @mdcmouse1
Welcome to the forum.

Can you please post a link to data/specs of the control grip?

Also note that you are expecting the grip to communicate through the serial pins of the UNO that you are also serial printing to the IDE through those same pins.

Might be worth using the SoftwareSerial library and two other pins to communicate between the UNO and the grip.

Tom.... :smiley: :+1: :coffee: :australia:

Hi Tom!

Here is the info on the grip: https://cdn.prod.website-files.com/65605b8654111b23cfa3a312/65f1ace4a8562eb158b43acf_Control%20Grips.pdf

I am so new to this...

Also note that you are expecting the grip to communicate through the serial pins of the UNO that you are also serial printing to the IDE through those same pins.

I take it you cannot do that? The grip is connected to a USB Shield that is installed on the Uno. I assumed there would be an easy plug n play way (library) to just connect, assign the buttons to pins (tell them what to do), and off I go.

Might be worth using the SoftwareSerial library and two other pins to communicate between the UNO and the grip.

Will look into it, thanks! Much appreciated

Can you post links to the shield please?

The documentation is not very good on the serial protocol, such as speed and if the grip needs to be prompted to give its data.

Tom.... :smiley: :+1: :coffee: :australia:

Try this tree: file:///home/gil/Downloads/MAX3421E.pdf
It will tell you all about it and also explain the registers etc.

USB Host Shield

I will look into that as well, thanks!