MCP4231, using only one of the two digital potentiometers

It probably will not work as described. Post a schematic, not a frizzy thing to show how you connected this. The pot will not drive a LED directly which is what I am reading in your description.