footswitch icon indicating copy to clipboard operation
footswitch copied to clipboard

Not working with Raspberry Pi

Open mzm2lh opened this issue 7 years ago • 4 comments

I have a PCSensor 413D:2107 foot switch and the program is failing because dev == (nil) at footswitch.c 112. Can you suggest remedy?

mzm2lh avatar Feb 08 '18 10:02 mzm2lh

Does it work when you start it as root?

rgerganov avatar Feb 08 '18 12:02 rgerganov

'footswitch -r' works when run as root: [switch 1]: a [switch 2]: b [switch 3]: c

But 'footswitch -1 x' or 'foot switch -2 x' or 'foot switch -3 x' returns: "error writing data ((null)) [usb_write(), foot switch.c:151]"

The program was installed when logged in as a normal (non-root) user (pi).

mzm2lh avatar Feb 08 '18 20:02 mzm2lh

You need to specify number of pixels when using -x. Like this:

footswitch -1 -x 10

rgerganov avatar Feb 09 '18 06:02 rgerganov

Sorry, my bad; I am entering commands as per documentation, and as root user, like: sudo footswitch -1 -k x or sudo footswitch -k x

But I always get: "error writing data ((null)) [usb_write(), footswitch.c:143"

(Now line 143 instead of 151 because I took out my inserted fprint statements)

mzm2lh avatar Feb 09 '18 08:02 mzm2lh