Was using the code from above, and it was working for a bit but now falls over with some larger files. All the other code is running as expected and presents no memory error. I'll give your above suggestion a try and see if I get any information.
Was also looking at hooking up the VS1053 break out mp3 player, but no having much luck with that either. I'm assuming it's down to having an sdcard already on the Espruino 1.4, as I get a NOT_READY response from it when I hook up the VS module to SPI2 (LCD is on SPI1) and try to connect to it with E.connectSDCard. I'm assuming it's due to the require('fs') only reading teh onboard sdcard so tried separating them and assigning as unique, but no dice.
var fs, mp3, temp;
// LCD
var LCDGND = B1,
LCDLIGHT = B0,
LCDVCC = A7,
LCDSCK = A6,
LCDMOSI = A5,
LCDSPI12SCK = A4,
LCDSPI2MISO = A3,
LCDSPI2MOSI = A2;
function onInit()
{
clearInterval();
fs = require('fs');
_loadSettings();
// set up temp sensor
temp = require("DS18B20").connect(ow);
// Setup SPI
var SPI1 = new SPI();
SPI1.setup({ sck:LCDSCK, mosi:LCDMOSI });
// Initialise the LCD
g = require("PCD8544").connect(SPI1,LCDSPI12SCK,LCDSPI2MISO,LCDSPI2MOSI, function()
{
LCDLIGHT.write(1); // Turn on the backlight
// When it's initialised, start...
_Start();
});
_setupMP3player();
}
function _setupMP3player()
{
mp3 = require('fs');
var SPI2 = new SPI();
SPI2.setup({mosi:B5, miso:B4, sck:B3});
E.connectSDCard(SPI2, B6 /*CS*/); // .... gives ERROR: UNable to mount SD card : NOT_READY
// see what's on the device
//print(mp3.readdirSync());
}
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.
Was using the code from above, and it was working for a bit but now falls over with some larger files. All the other code is running as expected and presents no memory error. I'll give your above suggestion a try and see if I get any information.
Was also looking at hooking up the VS1053 break out mp3 player, but no having much luck with that either. I'm assuming it's down to having an sdcard already on the Espruino 1.4, as I get a NOT_READY response from it when I hook up the VS module to SPI2 (LCD is on SPI1) and try to connect to it with E.connectSDCard. I'm assuming it's due to the require('fs') only reading teh onboard sdcard so tried separating them and assigning as unique, but no dice.