init
commit
3cb525ca25
@ -0,0 +1 @@
|
||||
env.sh
|
@ -0,0 +1,28 @@
|
||||
import time
|
||||
import zmq
|
||||
from pyPS4Controller.controller import Controller
|
||||
|
||||
|
||||
ctx = zmq.Context()
|
||||
socket = ctx.socket(zmq.PUB)
|
||||
|
||||
class ps4if(Controller):
|
||||
def __init__(self, **kwargs):
|
||||
Controller.__init__(self, **kwargs)
|
||||
|
||||
def on_x_press(self):
|
||||
socket.send_string("Hit x")
|
||||
|
||||
|
||||
def main():
|
||||
# do stuff
|
||||
print("Hello world")
|
||||
socket.bind("ipc:///penguinator/pubsub");
|
||||
|
||||
controller = ps4if(interface="/dev/input/js0",
|
||||
connecting_using_ds4drv=False)
|
||||
controller.listen()
|
||||
while(True):
|
||||
time.sleep(1)
|
||||
|
||||
main()
|
Loading…
Reference in New Issue