@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...
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.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@MaBe, if you want to use the HW SPI, do you still need to create one with
new SPI()
? Can you not just use theSPI1
? 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 - usespi = new SPI();
to not mess with SPI1...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.