Question from a newbie.
Imagine there is a library that I use; for example: TMC2130Stepper.h
I enter the pin number (EN_PIN = 4) into TMC2130Stepper(…)
#define EN_PIN 4 #include <TMC2130Stepper.h> TMC2130Stepper driver = TMC2130Stepper(EN_PIN);
On MCP23017 GPIO expander, ports are named from 0 to 16 but I can only access them as below.
#include <Wire.h> #include <Adafruit_MCP23017.h> #define EN_PIN 0 Adafruit_MCP23017 mcp; mcp.digitalWrite(EN_PIN, HIGH);
My question is; how I can use a pin (GPIO) number that is on MCP23017 in TMC2130Stepper function?