Most recent activity
-
- 48 comments
- 13,750 views
-
-
-
I tried the software SPI again and removed the "NodeMCU." before the pin. Like this:
var s = new SPI(); s.setup({mosi:D7, miso:D6, sck:D5}); E.connectSDCard(s, D2); console.log(require("fs").readdirSync());
And then i get this output. Maybe this says something to anyone?
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.113 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 1MB:512/512, manuf 0xe0 chip 0x4014 >echo(0); ERROR: Cannot change pins used for flash chip ERROR: Cannot change pins used for flash chip ERROR: Unable to mount SD card : NOT_READY undefined =undefined
Also with the Hardware SPI example, SPI1 is used. int the documentation it says that there should be options for SPI1,SPI2 and SPI3.
Can it be that i should use the SPI2, because of the flash memory beeing attached to SPI1?
Is SPI2 dissabled in the firmware from the earlier post, or is it a matter of the ESP8266 not beeing able to find the SPI2? -
I tried both. But in the first place i always try to copy-paste-enter it line by line in the left terminal frame.
Connected >> =undefined >var s = new SPI(); ={ } >s.setup({mosi:NodeMCU.D7,miso:NodeMCU.D6,sck:NodeMCU.D5}); =undefined >E.connectSDCard(s,NodeMCU.D2); =undefined >console.log(require("fs").readdirSync()); ERROR: Unable to mount SD card : NOT_READY undefined =undefined >
-
Ah, that worked great!
Seems i got my pin assignments correct.
>NodeMCU.D6.getInfo(); ={ "port": "D", "num": 12, "functions": { } } >NodeMCU.D5.getInfo(); ={ "port": "D", "num": 14, "functions": { } } >NodeMCU.D7.getInfo(); ={ "port": "D", "num": 13, "functions": { } } >NodeMCU.D2.getInfo(); ={ "port": "D", "num": 4, "functions": { } } >
-
-
I allready tried that first. And i tried again to be shure just now.
in the first section i did only your code from the last post, and the second i added one line to call for the FS library. Both didn't work... :(| __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.113 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 1MB:512/512, manuf 0xe0 chip 0x4014 >echo(0); =undefined >reset(); =undefined _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.113 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 1MB:512/512, manuf 0xe0 chip 0x4014 >echo(0); ERROR: Unable to mount SD card : NOT_READY undefined =undefined >
-
using this:
function onInit() { var s = new SPI(); E.connectSDCard(s, NodeMCU.D4); s.setup({mosi:NodeMCU.D13, miso:NodeMCU.D12, sck:NodeMCU.D14}); // see what's on the device console.log(require("fs").readdirSync()); } onInit();
i still get the same output:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.113 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 1MB:512/512, manuf 0xe0 chip 0x4014 >echo(0); ERROR: Unable to mount SD card : NOT_READY undefined =undefined >
Indeed! it was formatted as FAT16 before and later formatted as FAT32.