I am trying to get my ESP8266 to Set/Read the wipers on BOTH Pots0 and 1 of the MCP4XXX using the wrapped Library here https://www.b4x.com/android/forum/threads/mcp4xxx.101935/
The Header file in mcp4xxx has this line defined in it in the MCP4XXX Class.
MCP4XXX(byte select_pin = SS, Pot pot = pot_0, Resolution resolution = res_7bit, WiperConfiguration config = potentiometer);
That line is not in the rMCP4xxx h file.
In my code I have this line
mcp.Initialize(dp.D8,mcp.POT_0,mcp.RES8BIT,mcp.POTENTIOMETER)
I can read pot 0 OR pot 1 if I set it in the mcp4xxx.h file located in my B4R lib. But when I change it in my B4R program it has no effect, and I can only read one pot. The one I hard coded in that line in the MCP4XXX lib. I tried a bunch of different things and still can't figure out how to switch pots in my code so I can read and set both pots on mcp4251 chip. As you can guess I am pretty weak on the c++ side and wrapping libraries. Any help would be appreciated. Thanks !
The Header file in mcp4xxx has this line defined in it in the MCP4XXX Class.
MCP4XXX(byte select_pin = SS, Pot pot = pot_0, Resolution resolution = res_7bit, WiperConfiguration config = potentiometer);
That line is not in the rMCP4xxx h file.
In my code I have this line
mcp.Initialize(dp.D8,mcp.POT_0,mcp.RES8BIT,mcp.POTENTIOMETER)
I can read pot 0 OR pot 1 if I set it in the mcp4xxx.h file located in my B4R lib. But when I change it in my B4R program it has no effect, and I can only read one pot. The one I hard coded in that line in the MCP4XXX lib. I tried a bunch of different things and still can't figure out how to switch pots in my code so I can read and set both pots on mcp4251 chip. As you can guess I am pretty weak on the c++ side and wrapping libraries. Any help would be appreciated. Thanks !