Nano USBHost Shield - how to remap the pins?

Fairly new to Arduino but have programming experience.

I bought an Arduino Nano, a motor shield, and USBHost shield from Gravitech but I can't seem to get the USB Host shield working.

I added the USB Host Shield 2.0 Library and USB Joystick library.

Usb.init comes back with an error every time.

The Gravitech site instructions say to map the pins. But I am having little luck.

USBHost library avrpins.h file seems to be the place I need to go but I don't know where to find the right defines fro my boards. How do I find those for the nano?

I can't really imagine why you have two shields and an Arduino that doesn't take shields.

I can't imagine which pins you think you need to remap.

Help me out here.

Trying to make a simple drive around robot using Arduino Nano.

I bought these to be nice and small.

Nano:

Motor H-Bridge

USBHost shield to plug a Logitech F310 controller into.

That page says to remap some pins. (and no sample code, and searches yielded little)
• D2: USB Interrupt (optional via jumper)
• D7: USB GPX (optional via jumper)
• D8: MAX3421E chip select
• D11: SPI MOSI
• D12: SPI MISO
• D13: SPI SCK

I downloaded the USB Host and USB joystick libraries and included them in. Since the Nano is considered an AVS standard type I thought the pin mapping file avrpins.h might be the place to go.

#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__)
// "Classic" Arduino pin numbers

But I don't know where the definitions of the boards are to verify this. I could make a section that seems to work for my hardware and map the pins, and contribute it back, but this is where I am stuck.

Has somebody gotten the Gravitech USB Host boards to work?

The Sparkfun / Circuits at home board use:

SS: D10 / PB2
MOSI: D11 / PB3
MISO: D12 / PB4
SCK: D13 /PB5

The Gravitech Host Shield uses:

SS: D8 / PB0
MOSI: D11 / PB3
MISO: D12 / PB4
SCK: D13 /PB5

I have downloaded this library:

and in the “My Documents\Arduino\libraries\USB_Host_Shield_Library_2.0” folder

changed usbhost.h

//template< typename SPI_CLK, typename SPI_MOSI, typename SPI_MISO, typename SPI_SS > class SPi {
/* SPI pin definitions. see avrpins.h */
#if defined (gravitechUSBHost)
//typedef SPi< Pb5, Pb3, Pb4, Pb2 > spi; //stock arduino nano
//typedef SPi< P13, P11, P12, P8 > spi; //first guess
typedef SPi< Pb5, Pb3, Pb4, Pb0 > spi; //second guess
#warning “using gravitechUSBHost”
#elif defined(AVR_ATmega1280) || (AVR_ATmega2560) || defined(AVR_ATmega32U4) || defined(AVR_AT90USB646) || defined(AVR_AT90USB1286)
typedef SPi< Pb1, Pb2, Pb3, Pb0 > spi;

Now the first lines of the sketch have to start like this:

#define gravitechUSBHost
#include <usbhub.h>

but the examples don’t seem to work.

I am almost considering putting the Arduino Nano and the Gravitech Host on a breadboard and use jumpers to connect all the pins except D10 on the Nano, which will be connected to D8 on the Gravitech board

Anybody has made any other progress than this?

I am confused which boards you actually have.

I have this one:

Hi everyone,

I've got exactly the same problem: Arduino Nano and USB Host shield for Nano from Gravitech.
Usb.Init() comes back with an error as well.

Have you managed to get the thing worked?

Thank you very much!