E.connectSDCard( ) doesn't work on ESP8266

Posted on
  • SPI1.setup({sck:14, miso:12, mosi:13});
    E.connectSDCard(SPI1, 15);
    console.log(require("fs").readdirSync())­;
    

    result:

    Uncaught Error: Function "connectSDCard" not found!
    at line 1 col 3
    E.connectSDCard(SPI1,15);
    ^
    WARNING: Module "fs" not found
    Uncaught Error: Field or method "readdirSync" does not already exist, and can't create it on undefined
    at line 1 col 26
    console.log(require("fs").readdirSync())­;
    =undefined
    FirmVer: 1v91 Copyright 2016 G.Williams

  • Hi user73896,

    "fs" is not part of the ESP8266, because of too low firmware size.

  • There has been a recent build that includes the firmware - search the forums.

    @MaBe you could conditionally turn this on for your 4mb 1024/1024 build so that that build that has enough room would have the fs stuff?

  • @MaBe you could conditionally turn this on for your 4mb 1024/1024 build so that that build that has enough room would have the fs stuff?

    Y E S

    RELEASE=1
    EMBEDDED=1
    USE_NET=1
    USE_TELNET=1
    USE_GRAPHICS=1
    USE_CRYPTO=1
    USE_NEOPIXEL=1
    USE_FILESYSTEM=1

    ** user1.bin uses 519284 bytes of 933888 available

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

E.connectSDCard( ) doesn't work on ESP8266

Posted by Avatar for Aifer @Aifer

Actions