User Manual
Copy the following code to your code.py file on your microcontroller:
Connect to the serial monitor to see the output. It should look something like the following:
Make sure you see the same output! If you don't, check your wiring. Once you've succeeded, continue onto the next
page!
import board
import busio
from digitalio import DigitalInOut
from adafruit_esp32spi import adafruit_esp32spi
import adafruit_esp32spi.adafruit_esp32spi_requests as requests
print("ESP32 SPI hardware test")
esp32_cs = DigitalInOut(board.D10)
esp32_ready = DigitalInOut(board.D9)
esp32_reset = DigitalInOut(board.D7)
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!")
If you can read the Firmware and MAC address but fails on scanning SSIDs, check your power supply, you
may be running out of juice to the ESP32 and it's resetting
© Adafruit Industries https://learn.adafruit.com/adafruit-airlift-breakout Page 12 of 36










