As a newbie, i've been struggling to get keys send from from the MCP23017 through arduino into link2fs.
Keeping it simple at first I tried this script:

#include <Wire.h>
#include "Adafruit_MCP23017.h"

Adafruit_MCP23017 mcp;

void setup() {

mcp.begin(); // use default address 0
mcp.pinMode (0, INPUT); mcp.pullUp (0, HIGH);
pinMode(13, OUTPUT);
void loop() {
//digitalWrite(13, mcp.digitalRead(0));
if (!mcp.digitalRead(0)){Serial.println ("C02");}
}// end of inputpins

When pressing the button connected to pin 21 on the MCP the debug led 13 lights up.
Next step was trying to trigger the same button to lower the gear but no data is coming into link2fs.

Any Advise?