I'm afraid there's no library for SPI communication with ESP32 built in to Espruino, so the code require("esp32") won't work.
But, you could still use the SPI2.setup({mosi:B15, miso:B14, sck: B13}); code and then manually send commands with SPI2.send/write - assuming the ESP32 has firmware installed that supports communication via SPI?
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.
Hi,
I'm afraid there's no library for SPI communication with ESP32 built in to Espruino, so the code
require("esp32")
won't work.But, you could still use the
SPI2.setup({mosi:B15, miso:B14, sck: B13});
code and then manually send commands withSPI2.send/write
- assuming the ESP32 has firmware installed that supports communication via SPI?I'm not 100% sure if there is such a firmware... The standard AT command firmware (https://www.espressif.com/en/products/sdks/esp-at/overview) would appear to just want to communicate over serial...