This feels like it should be very simple, but I haven't been able to find an answer..
In a python script I am reading in data from a USB device (x and y movements of a USB mouse). it arrives in single ASCII characters. I can easily convert to unsigned integers (0-255) using ord. But, I would like it as signed integers (-128 to 127) - how can I do this?
Any help greatly appreciated! Thanks a lot.