File server with Metro M4 with Airlift Lite

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
garyvdg
 
Posts: 91
Joined: Thu Jul 25, 2013 12:37 pm

File server with Metro M4 with Airlift Lite

Post by garyvdg »

I am working on a project that uses an Adafruit Metro M4 with Airlift Lite. It is connected to TFT display and wired with a single DS1B20 temperature sensor.
My code includes the ability to save temperature readings to a micro SD card inserted in the card slot integral to the display.
I would like to have my device be able to serve the data file via WiFi to a computer on my home network.
I found a CircuitPython application (esp32spi_wsgiserver) on GitHub (https://github.com/adafruit/Adafruit_Ci ... iserver.py), which puts a colour picker in a browser window with which I can pick a colour for the NOEPIXEL on the M4 board. This application works just fine.
With a bit of modification to the colour picker example, I can "print" the data from the file to my web browser and then select, copy and paste it to an other application.
However, I would prefer to have the M4 serve up the file directly to my downloads folder.
I have not been able to find any examples for the M4 Express with the ESP32 that do this, nor have I found any documentation that explains how this could be done using the esp32spi_wsgiserver.

Recommendations / ideas on either of these two points (examples or relevant documentation) would be appreciated.
Thanks.

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

Re: File server with Metro M4 with Airlift Lite

Post by mikeysklar »

@garyvdg,

This looks difficult to do since the AirLift to achieve, but you might be able to make it happen. The closest example I can think of is our WiZ5500 (ethernet) file serving setup which also used an SD card. There is some example code for how to use the SPI bus to go back and forth between the network device and the SD card.

https://learn.adafruit.com/arduino-ethe ... d?view=all

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”