Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Read rotary encoder /dev/input/event0
Forum Updated to NodeBB v4.3 + New Features

Read rotary encoder /dev/input/event0

Scheduled Pinned Locked Moved Mobile and Embedded
rotary encodercustom signalevtestrotary
1 Posts 1 Posters 1.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zampi
    wrote on 28 Sept 2015, 18:14 last edited by Zampi
    #1

    Hi everyone,
    I have registered a rotary encoder in /dev/input/event0 and i try to test it with evtest.
    This is the output of the test:
    Input driver version is 1.0.1
    Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0
    Input device name: "rotary.4"
    Supported events:
    Event type 0 (EV_SYN)
    Event type 2 (EV_REL)
    Event code 0 (REL_X)
    Properties:
    Testing ... (interrupt to exit)
    Event: time 1167609644.822522, type 2 (EV_REL), code 0 (REL_X), value 1
    Event: time 1167609644.822522, -------------- EV_SYN ------------
    Event: time 1167609645.364383, type 2 (EV_REL), code 0 (REL_X), value 1
    Event: time 1167609645.364383, -------------- EV_SYN ------------
    Event: time 1167609645.850404, type 2 (EV_REL), code 0 (REL_X), value -1
    Event: time 1167609645.850404, -------------- EV_SYN ------------
    Event: time 1167609646.219635, type 2 (EV_REL), code 0 (REL_X), value -1
    Event: time 1167609646.219635, -------------- EV_SYN ------------
    Event: time 1167609646.603085, type 2 (EV_REL), code 0 (REL_X), value 1
    Event: time 1167609646.603085, -------------- EV_SYN ------------
    Event: time 1167609646.863794, type 2 (EV_REL), code 0 (REL_X), value -1
    Event: time 1167609646.863794, -------------- EV_SYN ------------
    Event: time 1167609647.188763, type 2 (EV_REL), code 0 (REL_X), value 1
    Event: time 1167609647.188763, -------------- EV_SYN ------------
    Event: time 1167609647.460842, type 2 (EV_REL), code 0 (REL_X), value -1
    Event: time 1167609647.460842, -------------- EV_SYN ------------
    Event: time 1167609647.879656, type 2 (EV_REL), code 0 (REL_X), value 1
    Event: time 1167609647.879656, -------------- EV_SYN ------------
    Event: time 1167609648.188644, type 2 (EV_REL), code 0 (REL_X), value 1
    Event: time 1167609648.188644, -------------- EV_SYN ------------
    Event: time 1167609648.503074, type 2 (EV_REL), code 0 (REL_X), value 1
    Event: time 1167609648.503074, -------------- EV_SYN ------------
    Event: time 1167609648.930157, type 2 (EV_REL), code 0 (REL_X), value 1
    Event: time 1167609648.930157, -------------- EV_SYN ------------

    I would like to create an event that allows me to read the value 1 or -1 generated by the movement of the encoder.
    Basically I have to create a custom signal with the parameters that I need... how can I do it?

    thank you

    1 Reply Last reply
    0

    1/1

    28 Sept 2015, 18:14

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved