I haven't got the breakout yet, so I'm struggling to debug exactly why it's working on a Pico but not the Wifi.
You could maybe try adding a timeout after setting up the SD card - that's about the only thing I can think would really be different. You're using hardware SPI so it'd not like it'll be going too fast or anything.
function onInit() {
console.log("Connected!");
// Wire up up MOSI, MISO, SCK and CS pins (along with 3.3v and GND)
SPI1.setup({mosi:B5, miso:B4, sck:B3});
E.connectSDCard(SPI1, B6 /*CS*/);
setTimeout(function(){
// see what's on the device
console.log(require("fs").readdirSync());
for (var i in files)
console.log("Found file "+files[i]);
var f = E.openFile("log.txt", "w");
f.write("Testing 123");
f.close();
f = E.openFile("log.txt", "r");
f.pipe(console.log);
f.close();
},2000);
}
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.
I haven't got the breakout yet, so I'm struggling to debug exactly why it's working on a Pico but not the Wifi.
You could maybe try adding a timeout after setting up the SD card - that's about the only thing I can think would really be different. You're using hardware SPI so it'd not like it'll be going too fast or anything.