You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • @MaBe, if you want to use the HW SPI, do you still need to create one with new SPI()? Can you not just use the SPI1? SPI1 - all uppercase - is defined in ESP8266 (just checked0). var SPI1 = new SPI() may mess with that. If you want to create the SW SPI, I'd - by my gut to stay way for sure from trouble / interference - use spi = new SPI(); to not mess with SPI1...

    >SPI // <--- entered in console
    =function () { [native code] }
    >SPI1 // <---
    =SPI1
    >SPI1.setup() // <---
    =undefined
    >var s = SPI1; // <---
    =SPI1
    >SPI1 = new SPI(); // <---
    =SPI: {  }
    >SPI1 === s // <---
    =false
    >SPI1 // <---
    =SPI: {  }
    >
    

    Lines 5 and 14 and 11 show that you get new objects... and loose the HW SPI, I guess... do you? May be it just looks on the JS level that way, but not under the hood where it is created before JS takes place.

About

Avatar for allObjects @allObjects started