Avatar for ManoBiletsky

ManoBiletsky

Member since Sep 2016 • Last active Feb 2018
  • 1 conversations
  • 19 comments

Most recent activity

  • in ESP8266
    Avatar for ManoBiletsky

    Indeed! it was formatted as FAT16 before and later formatted as FAT32.

  • in ESP8266
    Avatar for ManoBiletsky

    I know my wiring is correct because i allready had it working with code from the Arduino IDE.

    I can't show you the wiring because it is on a pcb. There are no wires. (Look ma! No wires :) )

  • in ESP8266
    Avatar for ManoBiletsky

    See the attached schematic.

  • in ESP8266
    Avatar for ManoBiletsky

    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?

  • in ESP8266
    Avatar for ManoBiletsky

    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.D­6,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
    > 
    
  • in ESP8266
    Avatar for ManoBiletsky

    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": {  }
     }
    >
    
  • in ESP8266
    Avatar for ManoBiletsky

    I found, that when i change my CS pin to NodeMCU.D5 instead of the (accually) used D4, i get a 'Connection lost' error. When i use D4 i get 'SD card not found!'

    I use MOSI GPIO13, MISO GPIO12 and SCK GPIO14. Anyone knows the NodeMCU.Dx replacement for GPIO12? I guess it is D6 but not sure...

  • in ESP8266
    Avatar for ManoBiletsky

    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
    > 
    
  • in ESP8266
    Avatar for ManoBiletsky

    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
    > 
    
Actions