EasyManuals Logo

Adafruit AirLift Shield ESP32 User Manual

Adafruit AirLift Shield ESP32
57 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #27 background imageLoading...
Page #27 background image
In order, the example code...
Initializes the ESP32 over SPI using the SPI port and 3 control pins:
esp32_cs = DigitalInOut(board.ESP_CS)
esp32_ready = DigitalInOut(board.ESP_BUSY)
esp32_reset = DigitalInOut(board.ESP_RESET)
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)
Tells our requests library the type of socket we're using (socket type varies by connectivity type - we'll be
using the adafruit_esp32spi_socket for this example). We'll also set the interface to an esp object. This is a
little bit of a hack, but it lets us use requests like CPython does.
requests.set_socket(socket, esp)
Verifies an ESP32 is found, checks the firmware and MAC address
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])
Performs a scan of all access points it can see and prints out the name and signal strength:
© Adafruit Industries https://learn.adafruit.com/adafruit-airlift-shield-esp32-wifi-co-processor Page 27 of 56

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Adafruit AirLift Shield ESP32 and is the answer not in the manual?

Adafruit AirLift Shield ESP32 Specifications

General IconGeneral
MicrocontrollerESP32
InterfaceSPI
WiFi802.11 b/g/n
Voltage Level3.3V
TypeShield
SD Card SocketNo
Wireless ConnectivityWiFi
Input Voltage5V
Flash Memory4 MB
SRAM520 KB
Clock Speed240 MHz
USBNo
Compatible BoardsArduino Uno, Mega
AntennaCeramic
Digital I/O PinsNot directly accessible (used for SPI communication)