![Adafruit AirLift Shield ESP32 Manual Download Page 22](http://html.mh-extra.com/html/adafruit/airlift-shield-esp32/airlift-shield-esp32_manual_2845848022.webp)
board.
Next you'll need to install the necessary libraries to use the hardware--carefully follow the steps to find and
Adafruit's CircuitPython library bundle
(https://adafru.it/uap)
. Our CircuitPython
a great page on how to install the library bundle
(https://adafru.it/ABU)
.
You can manually install the necessary libraries from the bundle:
adafruit_esp32spi
adafruit_requests.mpy
adafruit_bus_device
Before continuing make sure your board's lib folder or root filesystem has the adafruit_esp32spi,
adafruit_requests.mpy, and adafruit_bus_device files and 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.D10)
esp32_ready = DigitalInOut(board.D7)
esp32_reset = DigitalInOut(board.D5)
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)
if esp.status == adafruit_esp32spi.WL_IDLE_STATUS:
print("ESP32 found and in idle mode")
print("Firmware vers.", esp.firmware_version)
print("MAC addr:", [hex(i) for i in esp.MAC_address])
for ap in esp.scan_networks():
print("\t%s\t\tRSSI: %d" % (str(ap['ssid'], 'utf-8'), ap['rssi']))
print("Done!")
(https://adafru.it/BlO)
to see the output. It should look something like the
following:
© Adafruit Industries
https://learn.adafruit.com/adafruit-airlift-shield-esp32-wifi-co-processor
Page 22 of 56