I am trying to send a temporary signal through one of the GPIO pins on my Pi 4, like to light up an LED for 1 second then turn off. Is there are way to do this by clicking on a button on my HTML web page? Right now, I can only perform this function using a terminal command that calls a simple python script, like this one from thepihut.com

import RPi.GPIO as GPIO
import time

I don't necessarily need to use Python, that is just the one I am most familiar with. If there is a way to embed it somehow in a button in a HTML or even PHP file using JavaScript or some other function, that would be stellar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.