REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    REXduino 4-wire touchscreen

    General
    2
    2
    482
    Loading More Posts
    • 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.
    • H
      hrabalo
      last edited by

      Hi, I would like to measure the position on the 4-wire touch screen. For this I have to switch A0, A1, A2, A3 between analog input and digital output. Is it possible in REXduino?

      Thank you.

      This is code for Arduino and I would like to implement in REXduino.

        int X,Y; //Touch Coordinates are stored in X,Y variable
         pinMode(Y1,INPUT);
         pinMode(Y2,INPUT);  
         digitalWrite(Y2,LOW);
         pinMode(X1,OUTPUT);
         digitalWrite(X1,HIGH);
         pinMode(X2,OUTPUT);
         digitalWrite(X2,LOW);
         X = (analogRead(Y1))/(1024/Xresolution); //Reads X axis touch position
          
         pinMode(X1,INPUT);
         pinMode(X2,INPUT);
         digitalWrite(X2,LOW);
         pinMode(Y1,OUTPUT);
         digitalWrite(Y1,HIGH);
         pinMode(Y2,OUTPUT);
         digitalWrite(Y2,LOW);
         Y = (analogRead(X1))/(1024/Yresolution); //Reads Y axis touch position```
      1 Reply Last reply Reply Quote 0
      • cechuratC
        cechurat
        last edited by

        Hi!
        Thanks for reaching out. In general, it is possible.
        However, you would need to edit the sketch for REXduino in order to read out the touch position and communicate it to REXYGEN which could be pretty challenging (depending on your programming skills). It would require knowledge of the REXduino communication mechanism which is not documented (except the code).

        What about posting the touch position information via REST API to REXYGEN? Example "0302-11 ESP8266 REST API" might be used as a hint.

        Kind Regards,
        Tomas

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

        There is also an outdated REXYGEN community forum.

        Powered by NodeBB.