RP2040 + ESP32 AirLift = Nano Connect??

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
blakebr
 
Posts: 957
Joined: Tue Apr 17, 2012 6:23 pm

RP2040 + ESP32 AirLift = Nano Connect??

Post by blakebr »

Hello,

Is an RP2040 Feather connected to an ESP32 AirLift WiFi essentially an RP2040 Nano Connect as far as WiFi is concerned?
In other words, should WiFi code on one platform run on the other with only minor changes that can be detected/adjusted by code.py?

TIA Bruce

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 + ESP32 AirLift = Nano Connect??

Post by mikeysklar »

Bruce,

I think you might be able to make the AirLift function with other RP2040 variants just by making some pin changes. It is mostly an SPI connection. However, you should note that doing more advanced things like pushing updated AirLift firmware through a different controller will likely be more of a hassle than it is worth.

https://learn.adafruit.com/quickstart-r ... t-firmware

I would use at least one Feather RP2040 to test things and do firmware updates then you can experiment with other Nano RP2040's for compatibility.

User avatar
blakebr
 
Posts: 957
Joined: Tue Apr 17, 2012 6:23 pm

Re: RP2040 + ESP32 AirLift = Nano Connect??

Post by blakebr »

Mike,

Thanks for your reply.

I am not looking to update the AirLift firmware. The update process looks like more work than it is worth.

My question was is a Feather with AirLift essentially a Nano Connect.
My guess is only the SPI and MOSI/MISO pin definitions would need to be accounted for.

What I don't want to do is start down the path of doing the conversion only to end up chasing my own tail.

Bruce

User avatar
blakebr
 
Posts: 957
Joined: Tue Apr 17, 2012 6:23 pm

Re: RP2040 + ESP32 AirLift = Nano Connect??

Post by blakebr »

It was so much easier than I thought it would be.
I only had to change three lines of code.
ESP_CS1, ESP_READY, and ESP_BUSY had to be defined by their GPIO pin.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 + ESP32 AirLift = Nano Connect??

Post by mikeysklar »

Awesome. Congrats and thank you for the summary of changes.

User avatar
blakebr
 
Posts: 957
Joined: Tue Apr 17, 2012 6:23 pm

Re: RP2040 + ESP32 AirLift = Nano Connect??

Post by blakebr »

The code: WiFi is defined in the variable definition area at the beginning of the code.

Code: Select all

if (WiFi == 1): # 0=None, 1=Nano Connect, 2=AdaFruit Feather with AirLift
    print("Nano RP2040 Connect in use")
    # ESP32 pins aka Connect/WiFi
    esp32_cs    = DigitalInOut(board.CS1)
    esp32_ready = DigitalInOut(board.ESP_BUSY)
    esp32_reset = DigitalInOut(board.ESP_RESET)
if (WiFi == 2): # ESP32 pins aka AirLift/WiFi
    print("AdaFruit RP2040 Feather in use with AirLift")
    esp32_cs    = DigitalInOut(board.D9)
    esp32_ready = DigitalInOut(board.D10)
    esp32_reset = DigitalInOut(board.D5)
# use SPI to connect to the ESP32
spi         = busio.SPI(board.SCK1, board.MOSI1, board.MISO1)
esp         = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)
requests.set_socket(socket, esp)
Last edited by blakebr on Fri Sep 10, 2021 2:50 pm, edited 1 time in total.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 + ESP32 AirLift = Nano Connect??

Post by mikeysklar »

Oh awesome. I didn't realize the Nano RP2040 had already made it in there.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”