Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4777

Networking and servers • using flask on Pi 4 to control Pico

$
0
0
Hello, all.

I have some questions about using flask on the Pi. I tried simple code to get something working & I'm running into issues....

Code:

from flask import Flaskapp = Flask(__name__)@app.route("/")def index():return "Hello from Flask"app.run(host="0.0.0.0")
This worked using Geany to compile & execute. I can see the web page on Chromium on the Pi. But when I try connect to the Pi using a laptop on the same network it doesn't work.

The end game for this is to create a web page on the Pi that I can use to control LEDs & such on a connected Pico. Sounds simple enough, right?

Any help you can offer will be greatly appreciated.
--Don

Statistics: Posted by ttu_Don — Sun May 05, 2024 1:33 am



Viewing all articles
Browse latest Browse all 4777

Trending Articles