Controlling the Pi from a web-based app
Sep 24, 2019
4 minutes
We’re going to create a web interface using Anvil that uses just Python. This interface will enable us to control real components: a red and blue LED along with a buzzer, connected to a Raspberry Pi.
The hardware build for this project is just two LEDs, one connected to GPIO17 and the other to GPIO27. We used a 330 Ohm resistor to connect each LED to the GND pins of a Raspberry Pi 4. The buzzer is connected to GPIO22 and GND, and requires no resistor. Please see the diagram in the download for this project for detailed information.
Writing the code
You’re reading a preview, subscribe to read more.
Start your free 30 days