First off all, sorry for my english, it is not my native language, so google will help me with this write task
I have a Raspberry running Apache, php5 and browser chormium on kiosk mode and everything works fine.
Now i need to make a python script to change/refresh php page everytime the gpio pin XX (ex 23) recieve a signal.
for exemple, i have 2 php pages (blackscreen.php and index.php), so when raspberry startup, the chromium will initiate with blackscreen.php and when gpio pin recieve a signal this page should be changed to index.php.
i tried the codes below
Code: Select all
import os, time
import RPi.GPIO as GPIO
import subprocess
GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
while True:
GPIO.wait_for_edge(23, GPIO.RISING)
subprocess.call(["chromium", "http://192.168.0.1/index.php"])
breakand with this code
Code: Select all
import os, time
import RPi.GPIO as GPIO
import webbrowser
GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
while True:
GPIO.wait_for_edge(23, GPIO.RISING)
webbrowser.open(http://192.168.0.1/index.php)
breakthanks!