Identical behavior when I changed my code to this:
SPI2.setup({scl:B13,miso:B14,mosi:B15,baud:1000000});
digitalWrite(C4,1);
var digipot=require("MCP4xxxSPI").connect(SPI2,C4,1,128);
Interestingly enough, once it has worked, reset() doesn't make it stop working. IE, if I do the above, then fs.readdir(), then press "send to espruino" again (resetting the espruino), it works immediately without having to do anything.
It's something in the espruino - if I power cycle the part after making it with with fs, it continues to work.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Identical behavior when I changed my code to this:
Interestingly enough, once it has worked, reset() doesn't make it stop working. IE, if I do the above, then fs.readdir(), then press "send to espruino" again (resetting the espruino), it works immediately without having to do anything.
It's something in the espruino - if I power cycle the part after making it with with fs, it continues to work.