Sparkfun USB Host Shield - How to code GPIN1 ?

Hey all,

I've got a question that is driving me nuts for a few days now :stuck_out_tongue:

How do I hookup and get input from a simple push button to the onboard GPIO of the Usb Host Shield?

Current setup:

  • Arduino R3 Uno
  • Sparkfun USB Host Shield (new version) (D7 to RST)
  • USB Host Shield library Version 2.0 (1.2.1)
  • connected uno though usb to macbook
  • button, connected as following:

R1 = 10K Ohm
Input pin is GPIN1 (on usb host shield)
VCC = 3.3V

I've been searching like crazy on some solutions or documentation on it. Nothing so-far.
The same setup on the A1 pin, 5V VCC, R1=100K did work.

(can't use the pins on the Arduino, since I'm running out of pins :slight_smile:

Any, any help would be much appreciated :slight_smile:
fyi, I think I'm currently still in the script-kiddy pool :stuck_out_tongue:

-edit- changed the title

The GPINx are inputs into the MAX3421E.
I would suggest that you read the datasheet for that IC.

This might help. Never used the functions myself though.

usbhost.h:        void gpioWr(uint8_t data);
usbhost.h:        uint8_t gpioRd();


uint8_t maxgpio = Usb->gpioRd();