Hi all,
I am using the Arduino UNO and the MCP23017 on my own LCD shield.
So far If I press a button, I get an LED going. So input and outputs are fine.
Now it comes to the LCD part:
What must I type in when I define the LCD pins? Code
#include <Wire.h>
#include "Adafruit_MCP23017.h"
#include <LiquidCrystal.h>
Adafruit_MCP23017 mcp;
LiquidCrystal lcd(rs, en, d4,d5,d6,d7);
void setup() {
mcp.begin(); // use default address 0
mcp.pinMode(0, INPUT);
mcp.pinMode(1, OUTPUT);
mcp.pinMode(2, INPUT);
mcp.pinMode(3, INPUT);
mcp.pinMode(4, OUTPUT);
mcp.pinMode(5, INPUT);
mcp.pinMode(6, OUTPUT);
mcp.pinMode(7, OUTPUT);
mcp.pinMode(8, OUTPUT);
mcp.pinMode(9, OUTPUT);
mcp.pinMode(10, OUTPUT);
mcp.pinMode(11, OUTPUT);
mcp.pinMode(12, OUTPUT);
mcp.pinMode(13, OUTPUT);
mcp.pinMode(14, OUTPUT);
mcp.pinMode(15, OUTPUT);
}
void loop() {
mcp.digitalWrite(8, mcp.digitalRead(5));
mcp.digitalWrite(4, mcp.digitalRead(0));
mcp.digitalWrite(9, mcp.digitalRead(3));
}
At the part where it say's :
LiquidCrystal lcd(rs, en, d4,d5,d6,d7);
How do I map the rs input from the LCD to mcp output 10.
mcp.digitalWrite(10) didnt work.
I am using my own shield design so the Adafruit_RGBLCDShield library doesnt help me a lot.
Regards
Andy
