Documentation on tablet data (developer request)
Hi !
I am currently developing a drawing interface that interacts with a XYZ machine (plotter). I can get X and Y with the pen coordinates on screen, and I want to detect Z with the pen pressure.
I am developing the program with python and I can get the data sent from the tablet to my computer with the module pywinusb.hid, like so:
import pywinusb.hid as hid
# detect tablet
device = None
my_tablet = "PTK-440"
for dev in hid.find_all_hid_devices():
if my_tablet == dev.product_name:
device = dev
break
# get tablet data
def on_data(data):
log.info(f"tablet data: {data}")
if device:
try:
self.device.open()
self.device.set_raw_data_handler(on_data)
except Exception as err:
log.error(err)
And this is what I get at each frame:
[213, 32, 124, 92, 152, 81, 134, 3, 0, 0, 2, 8, 16, 0, 253, 32, 128, 156, 2, 8, 16, 0, 0, 0, 0, 0, 0, 0, 96, 9, 20, 5, 156, 24, 180, 45, 0, 0]
-
Hi Thibault ARNOUL,
Please have a look here: https://developer-docs.wacom.com/docs/overview/device-kit/overview/
You can probably find the info you need there. If need further help, please contact the Dev team directly.
Cheers
0
Please sign in to leave a comment.
Comments
1 comment