I need to link a momentary push swith to a raspberry pi. I need to know if it's possible to make the mps issue either a command to the Linux OS or a command to the browser that replicates pushing a specific HTML button a page in the browser? What's possible and which is the best option?

3 Years
Discussion Span
Last Post by rubberman

Most systems have some sort of I/O ports, and pi is certainly likely to have such. You should be able to write software to monitor the port(s) that the switch is connected to (how are your soldering skills?) and trigger an interrupt handler as needed. This is not "junior grade" programming. You will need to write a device driver, or use one that is already on the system to do this. It may be possible to write a user-space program to monitor the I/O ports you use, but it will be likely necessary to poll the port states continuously, a major performance hit to be sure. Hardware interrupt handlers have much less impact upon system performance since they are hardware event triggered. No push == no event... :-)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.