• Have you tried it with another card, just in case? And is your Espruino Wifi firmware up to date?

    You might be hitting issues with Adafruit's adaptor because it has a level converter on it. It's set up to convert 3.3v signals to 5v, but Espruino WiFi is 3.3v too. You don't have to worry about CD at all though.

    Adding a physical pullup resistor (10k?) between CS (B1) and 3.3v could be a good idea though. I'm afraid the internal pullup won't cut it, since at power on your code won't have executed, so it will still be floating for a while.

    What you'be done looks like it'd be fine, but you could also try disconnecting the wire you have for 3.3v and connecting 5v to Espruino WiFi's VUSB (right next to 3.3v on the WiFi board). As I understand it the module has its own 3.3v regulator and you can just use that instead.

    The other thing is Adadfruit's docs mention long wires being a problem, and so if none of the above work you could potentially get rid of all the wires, use software SPI, and push the SD card adaptor in right next to Espruino WiFi on pins B1/B10/B13/B14/B15 - with GND/3v/5v hanging over the edge so you can connect power properly:

    var spi = new SPI();
    spi.setup({mosi:B13, miso:B14, sck:B15});
    E.connectSDCard(spi, B10);
    console.log(require("fs").readdirSync())­;
    
About

Avatar for Gordon @Gordon started