zampi91 0 Newbie Poster

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