It looked straight forward, but somehow I seem to have missed something on getting the nodeMCU SPI to work with a digital potentiometer (MPC41100)
flashed the spi module,
using the HSPI pins, using a resistor to gnd on ChipSelect pin and the following code, but the wiper remains on it's default position.
-- Using HSPI to MCP41100 digital potentiometer
cs = 8
gpio.mode(cs, gpio.OUTPUT)
spi.setup(1, spi.MASTER, spi.CPOL_LOW, spi.CPHA_LOW, 8, 8)
gpio.write(cs,gpio.HIGH)
function setPot(R)
gpio.write(cs,gpio.LOW)
wrote = spi.send(1, 19, R)
gpio.write(cs,gpio.HIGH)
end
setPot(64)Any hint is very much appreciated