
Then, include the following code to use the pin:
esp32_gpio0 = DigitalInOut(board.D10)
CircuitPython Installation of ESP32SPI
Library
You'll need to install the
Adafruit CircuitPython ESP32SPI
librar
y on your CircuitPython board.
First make sure you are running the
latest version of Adafruit CircuitPython
(https://
adafru.it/Amd)
for your board.
Next you'll need to install the necessary libraries to use the hardware--carefully follow
the steps to find and install these libraries from
Adafruit's CircuitPython library bundle
(https://adafru.it/uap)
. Our CircuitPython starter guide has
(https://adafru.it/ABU)
.
You can manually install the necessary libraries from the bundle:
adafruit_esp32spi
adafruit_bus_device
Before continuing make sure your board's lib folder or root filesystem has the adafrui
t_esp32spi and adafruit_bus_device folders copied over.
Next
make sure you are set up to connect to the serial console
(https://adafru.it/Bec)
CircuitPython Usage
Copy the following code to your code.py file on your microcontroller:
import board
import busio
from digitalio import DigitalInOut
from adafruit_esp32spi import adafruit_esp32spi
print("ESP32 SPI hardware test")
esp32_cs = DigitalInOut(board.D13)
esp32_reset = DigitalInOut(board.D12)
•
•
©Adafruit Industries
Page 28 of 54