Hi,have you installed the WiringPi library? Have you connected your LED and button correctly? Does your LED work with a simple WiringPi test?Best regards,Manfred.
Maybe it is the easiest, when you compare the touch detection from your working main.c file with the touch detection of the current ew_bsp_touch.c implemenation. It assume that your touch driver provides the values with some offset and scaling.
The current touch coordinates are used as they are:
if ( code == ABS_MT_POSITION_X ) touchX = value; else if ( code == ABS_MT_POSITION_Y ) touchY = value;
Now you can add your offset/scaling:
if ( code == ABS_MT_POSITION_X ) touchX = ( TouchAreaWidth * ( value - X_MIN )) / ( X_MAX - X_MIN ); else if ( code == ABS_MT_POSITION_Y ) touchY = ( TouchAreaHeight * ( value - Y_MIN )) / ( Y_MAX - Y_MIN );
(Remark: This code is not tested - it is based on the main.c that you have referred....)
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!