Main Menu

Menu

Wednesday 21 December 2011

mbed MicroBridge in Thunder Board

1. Import the mbed MicroBridge project for mbed NXP1768 to the online compiler.
2. Open the Adb.cpp file
3. Go to Line 768
4. Add the following red lines in the code:

................................................
                        //other
                        log("non input,output Endpoint address=%d,wMaxPacketSize=%d,bmAttributes=%d\r\n",input_ep,epDesc->wMaxPacketSize,epDesc->bmAttributes);
                    }
                }
                break;
            default:
                log("unkown desc type(%d) \r\n",descType);
        }
        p+=descLen;
    }
   
    input_ep=129;
    output_ep=1;
    
   
    if (!(input_ep && output_ep)) {
        log("can't find accessory endpoints\r\n");
        return(false);
    }
   
.................
5. Download and run the project to your connected mbed device.


Connections:
I used a mini B breakout of Sparkfun for this project.

Mini USB                  mbed NXP1768

Vcc                             Vout (3.3V Regulated Out)
D-                               D-
D+                              D+
ID                               No connection
GND                           GND (0V)

and the mini USB to the mini USB OTG (ADB) of the Thunder Board.
For testing I connected a potentiometer in pin13 and two LEDS in pin 25 and 26.

Applications in the side of Android:
ServoControl.zip -->http://code.google.com/p/microbridge/downloads/list

Application in the side of mbed (modified as explained above):
MicroBridge Project -->http://mbed.org/users/jksoft/programs/MicroBridge/lwareg

No comments:

Post a Comment