Categories

WREN 12S ME SDK – I2C GPIO

WIKI:

The WREN 12S ME SDK uses the popular MCP23017 I2C GPIO Expander to interface to the Motor Controller and Input Controller.

 

 

 

 

 

 

 

 

 

 

 

 

Using an Arduino library, such as one available from Adafruit MCP23017, you are easily able to control both the inputs and outputs with simple lines of code.   An example of code can be found in the WREN 12S ME SDK – Board Bring Up and Test Code

An expanded external generic Arduino MCP230174 Tutorial can be found on tronixstuff

Home Automation, such as Tasmota, also supports as standard the MCP23017.  A specific datasheet is available from Tasmota.

A list of the GPIOs is shown below, taken from WREN 12S ME SDK – GPIO Matrix

GPIONETPinInputOutputNotes
/RST/RST1Y Pull UpCHIP_PU 10k to 3v3
ADCDC_ADC2YADC - Input Volt Sense 30V Potential Divider
ENEN3Y Pull UpPull Down To Disable. UART DTR
16/LBLUE4YBlue LED - Low for Active LED
14TP5
12/LGREEN6YGreen LED - Low for Active LED
15TP7YY
VCC3V38
GNDGND9
13IO_INT10Y Pull UpMCP23017 INTB Out
2/LRED11YRed LED - Low for Active LED. via 100R
0GPIO012Y Pull UpUART RTS
4SDA13I2C SDA
5SCL14I2C SCL
RXDRXD15UART RXD
TXDTXD16UART TXD
GPA0EN_A#21 D0sensor29 0MCP23017 - 0x20
GPA1OUT_1A#22 D1sensor29 1MCP23017 - 0x20
GPA2OUT_2A#23 D2sensor29 2MCP23017 - 0x20
GPA3EN_B#24 D3sensor29 3MCP23017 - 0x20
GPA4OUT_1B#25 D4sensor29 4MCP23017 - 0x20
GPA5OUT_2B#26 D5sensor29 5MCP23017 - 0x20
GPB0IN_1A#1 D8sensor29 8MCP23017 - INTB OUT - 0x20
GPB1IN_1B#2 D9sensor29 9MCP23017 - INTB OUT - 0x20
GPB2IN_2A#3 D10sensor29 10MCP23017 - INTB OUT - 0x20
GPB3IN_2B#4 D11sensor29 11MCP23017 - INTB OUT - 0x20
GPB4/TALM#5 D12sensor29 12MCP23017 - INTB OUT - 0x20

Leave a Reply

This site uses User Verification plugin to reduce spam. See how your comment data is processed.