• Hi,
    i got this problem with microsd card reader ... when putting this simple code:

    SPI1.setup({mosi:D23, miso:D19, sck:D18});  
    E.connectSDCard(SPI1, D5); 
    console.log(require("fs").readdirSync())­;
    

    i get:

    Uncaught Error: Unimplemented on Linux
     at line 1 col 25
    E.connectSDCard(SPI1, D5);
                            ^
    Uncaught Error: Unable to mount media : NO_FILESYSTEM
     at line 1 col 39
    console.log(require("fs").readdirSync())­;
                                          
    =undefined
    

    i followed this schema:
    https://farm4.staticflickr.com/3954/3367­5026246_a5bb2ce4c6_o.jpg

    then i followed this schema:
    http://www.espruino.com/File+IO

    i tried with fat32 filesystem, i tried with ext3

    i tried changing pins to free pins ... with software spi
    nothing... at all
    always same error

    please someone help me

  • The default firmware for the ESP32 is setup to use an FAT files system on the last 1 Mb of the flash memory. To use and SPI SD card, you would need to do a custom build of the firmware, and turn of the FlashFS option. You can use SPI for other devices with the stock firmware

    https://github.com/espruino/Espruino/blo­b/master/boards/ESP32.py#L35

          'FILESYSTEM',
         'FLASHFS'     
       ],
    

    Would need to be changed to:

         'FILESYSTEM',
    #     'FLASHFS'     
       ],
    
    

    and the firmware rebuilt. Then an external SD card could be used.

  • So now i'm using 1mb and formatted it... but what i get now is that doesn't find any library from modules folder in project directory and even other libraries that should be present already in the firmware... the error i get is:

    var nfc = require("PN532").connect(I2C1);
    WARNING: Module "PN532" not found
    Uncaught Error: Unable to mount media : NO_FILESYSTEM
     at line 1 col 26
    var nfc = require("PN532").connect(I2C1);
    

    then i format with:

    E.flashFatFS({format:true});
    

    and what i get is:

    WARNING: Module "PN532" not found
    Uncaught Error: Could not open file : NO_PATH
     at line 1 col 30
    var mqtt = require("PN532").create(server, {
    

    what is it happening??

  • Ok... i just realized that i can't require on the left side of the espruino IDE... that was the problem...
    but i still get an error sometimes and sometimes not on trying to make this rfid work:

    ERROR: jshI2CRead:, slave doesn't ACK the transfer.
    NFC error undefined
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

ESP32 devkitC spi problem with microsd card reader

Posted by Avatar for user70656 @user70656

Actions