3

Provided neither Nginx and Gunicorn are used, are the hardware specs of the Pico enough to handle a very simple flask app? Also, does the Pico's MicroPython support flask? If not, how can I simulate such behavior on the Pico?

1
  • I don't think the Rpi Pico baby speaking MicroPython can support even very simple Flask applications. Simulating Flash is also mission impossible.
    – tlfong01
    Feb 11, 2021 at 13:57

2 Answers 2

6

No, even putting the severely under powered CPU and lack of dependency support aside, the 264KB of onboard ram is nowhere close to enough to run a flask server. Just importing flask into python takes over dozen megabytes of ram.

If you needed something very light and inexpensive to do this you would be much better off getting a Raspberry Pi Zero W.

2
  • 1
    Thanks for the answer. Is it possible to make the pico handle HTTP requests then by any means? Maybe socket programming? Feb 13, 2021 at 14:23
  • 1
    You probably could with some very basic c program and the right peripherals to connect it to a network. However, I still would not consider this idea because this will be much more challenging, much less capable, and even potentially more expensive when factoring in the external parts required. This is probably only a good idea when you need to remotely communicate with your device, for anything else including serving HTTP requests you should just stick with a normal Raspberry Pi.
    – sergmister
    Feb 13, 2021 at 18:25
0

I'm using an automation 2040w board

https://how2electronics.com/iot-controlled-relay-using-raspberry-pi-pico-w-wifi/#MicroPython_Code_to_Control_a_Relay_Module_via_Web_Server

Have a look here.

This has allowed me to run code remotely from a url in browser or with python requests module

requests.get("http://{IP}/?relay=on")

2
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 25 at 16:56
  • It seems unlikely after 2 years that the poser will change their hardware; they probably already have.
    – KDM
    Apr 30 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.