Javascript for turn on and off pins
Posted: Wed Jul 20, 2016 1:29 pm
Hi guys,
I want to use a Raspberry pi 3 to control the access in some place.
The Rpi, via a webrowser is going to check in a remote database(MySQL) the access code and then grant or not the access.
To do this I need to turn on and then off some pins in the Rpi.
I know how to manipulate pins in PHP and Python, but the Rpi is just the client (Web client) then the code would be executed in the server, therefore no pins in the Rpi are going to turn on or off.
Until I know java runs locally, I made a small script in pi4j that turn on and off the pins, but I don’t know how to put in the HTML code of the web page?
Can someone help?
Thanks in advance
Ernesto
I want to use a Raspberry pi 3 to control the access in some place.
The Rpi, via a webrowser is going to check in a remote database(MySQL) the access code and then grant or not the access.
To do this I need to turn on and then off some pins in the Rpi.
I know how to manipulate pins in PHP and Python, but the Rpi is just the client (Web client) then the code would be executed in the server, therefore no pins in the Rpi are going to turn on or off.
Until I know java runs locally, I made a small script in pi4j that turn on and off the pins, but I don’t know how to put in the HTML code of the web page?
Can someone help?
Thanks in advance
Ernesto