• Thanks @MaBe for your immediate response,

    re: 'The hardware SPI uses the pins shown in the board layout (CLK:D14, MISO:D12, MOSI:D13, CS:D15).'

    I also found this tidbit:
    "Also look at the NodeMCU.XX pins: http://www.espruino.com/Reference#NodeMC­­U"

    http://forum.espruino.com/conversations/­285936/#12951616

    SPI1.setup({ sck:NodeMCU.D5,miso:NodeMCU.D6,mosi:Node­MCU.D7 });
    print(SPI1);
    

    which gets me past this error:

    >ERROR: Cannot change pins used for flash chip
    

    and, which produced: (mapping the same as in the link you presented)

    >SPI: {
      "_options": { "sck": D14, "miso": D12, "mosi": D13 }
     }
    

    and surprisingly

    >SPI1.send("Hello");
    ="Hello"
    

    Still works. To confirm, I reset(1) and re-uploaded.

    Then, removed the jumper, and as expected, the data seen:

    ="\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x­FF\xFF"
    

    So, I believe SPI is now working, but the mapping of 'cs' and 'rst' is still problematic.

    Using the same format:

    >NodeMCU.D8
    =D15
    

    But when I try that format for 'cs':

    var rfm = require("RFM69").connect({spi:SPI, cs:NodeMCU.D8, freq:915}, function() {
        console.log("Connected");
      });
    
    print(rfm);
    

    Still seeing error:

    Uncaught Error: Function "send" not found!
     at line 1 col 10
    this.spi.send([a|128,b],this.cs)
             ^
    in function "w" called from line 1 col 11
    b.w(47,170);if(170!=b.r(47))throw Error("RFM69 not found");b...
              ^
    in function called from system
    {
      "spi": {
        "spi": function () { [native code] },
        "cs": D15, "freq": 915 },
      "cs": undefined, "rst": undefined, "freq": 434 }
    

    We can still see that 'cs' is not being accepted.

    Was hoping to find the source under the hood for where the other errors are occurring, when the value of 'cs' isn't being detected.

About

Avatar for Robin @Robin started