But I keep getting the message, even with multiple different SD cards, all formatted to Fat32.
"Uncaught Error: Unable to mount media : NOT_READY
at line 6 col 41
console.log(require("fs").readdirSync());"
I triple-checked all the connections, and then used a meter to check connectivity, power, shorts, etc. They were all correct.
So I figured it must be the socket. I removed it and soldered this one on in it's place, figuring that perhaps the added voltage regulation circuit might help:
But I still get the exact same error message. Am I missing something obvious here? Again, I checked all the connections and they're fine. I have a DS18B20 connected to different pins and it works great, so the Espruino appears to be fine. Test program for SD card looks like this:
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*/);
// 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();
}
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.
Hi folks,
I had wired up an SD card socket from Sparkfun:
https://www.mouser.com/ProductDetail/SparkFun-Electronics/DEV-13743/?qs=WyAARYrbSna7AKzdOk0X8g%3D%3D&gclid=Cj0KCQiAsqLSBRCmARIsAL4Pa9TQXhYrFu8L0QQcDVMAQE91NwG4RAm4irzcp8LHGGQq_icz7bBiY6saAuxPEALw_wcB
But I keep getting the message, even with multiple different SD cards, all formatted to Fat32.
I triple-checked all the connections, and then used a meter to check connectivity, power, shorts, etc. They were all correct.
So I figured it must be the socket. I removed it and soldered this one on in it's place, figuring that perhaps the added voltage regulation circuit might help:
https://www.adafruit.com/product/254?gclid=Cj0KCQiAsqLSBRCmARIsAL4Pa9SFqtMV7P6ijT3YC_O2wkmDjScGyUWDSlxgrcYFvsitDs03yyHVn2oaApQ7EALw_wcB
But I still get the exact same error message. Am I missing something obvious here? Again, I checked all the connections and they're fine. I have a DS18B20 connected to different pins and it works great, so the Espruino appears to be fine. Test program for SD card looks like this: