Wednesday, 15 August 2012

permissions - Launch .out file from python script when a button is pressed in Raspberry -



permissions - Launch .out file from python script when a button is pressed in Raspberry -

i connected raspberry pi using ssh , have got python script lauches file .out when button pressed. point can access python file pressing button shows next error when tries execute command in system:

import time import rpi.gpio gpio import os gpio.setmode(gpio.bcm) gpio.setup(24, gpio.in, pull_up_down = gpio.pud_up) def play(channel): os.system('./a.out') gpio.add_event_detect(24, gpio.rising, callback = play, bouncetime = 3000) while 1: time.sleep(1)

here error:

x11 connection rejected because of wrong authentication. (focus:2532): gtk-warning **: cannot open display: localhost:10.0

thank you

permissions raspberry-pi

No comments:

Post a Comment