the only problem will be that the library for the shield includes the mcp23017 object as a private member, so i don't think you can get at the pinMode function.
simplest thing might be to just make the mcp23017 member public, so you could use something like
- Code: Select all
// the buttons are on pins 0-4.
lcd._i2c.pinMode( 0, OUTPUT);
lcd,_i2c,digitalWrite (0, HIGH);
of course, i'm something of an object oriented ignoramus. mostly i just pretend my sketches are written in c. only occasionally does this lead to my being bitten on the ass.
EDIT : i moved the line
- Code: Select all
Adafruit_MCP23017 _i2c;
from the private to the public definitions in Adafruit_RGBLCDShield.h, then included the two lines above in the setup function in the example sketch and it compiled just fine.
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly