More about my Raspberry Pi's Web Site
See
http://raspi-online.info/
It now allows someone (with the password) to operate the 8 relays connected by I2C from the Pi. At the moment the relays themselves aren't connected to anything much -- but they could be. It looks like this:
I have one 8-switch Sain relay, but I think that two 16-relay boards would work, too. I adapted code in C language that I found at--
http://www.skpang.co.uk/blog/archives/637
I would have preferred to work in Python but code I've found in that language didn't work for me and I was more interested in results than I was in discovering the problem.
The web site does not send data or commands to the Pi. Rather the Pi uploads data on a scheduled basis and checks for change requests. So whenever the relays are changed (whether directly on the Pi or requested from the web) the then-current settings are uploaded to raspi-online.info for display as above. When a change is recorded from the web form (above) a temporary file is written and then queried every 2 minutes from the Pi.
No comments:
Post a Comment