USB Host Shield GPIO, is an Arduino library, that allows you to easily access the GPIO pins of the Max 3421 IC present in the USB Host Shield.
This library allows both read and write operations on the GPIO pins of the Max 3421 IC. Each pin can be read or written separately like the
Also note that only digital write and read are supported, since the IC doesn’t support PWM.
Stack the USB Host shield on top of Arduino. After that connect the GIn or GOut pins of the shield to your circuit as needed.
To use the library, you have to include the
MaxGPIO.h header file. After including the header file, create an instance of the
MaxGPIO class. You can call the
read() method on that object that you have created. These functions are similar to the
digitalRead() functions which is present in the core.
I have included an example sketch inside the
examples folder that explains how you can access the library.
I have also uploaded a video, which shows how you can use this library to access the GPIO pins. In the video, I have added 8 LED’s to the 8 GOut pins and I control each of them separately.
You can download the library from its github page. The examples are there inside the /examples folder. After downloading place the USB_Host_Shield_GPIO folder inside your Arduino’s /library folder.
This library requires the USB Host Shield library, without which this can’t work.
The library and the examples are released under released under BeerWare license.
I would, however, consider it a great courtesy if you could email me and tell me about your project and how this code was used, just for my own continued personal gratification.
- 2012-10-29 – v0.1 – Initial version