I acquired several (Elegoo UNO R3 2.8 Inches TFT Touch Screen) and corresponding Arduino machines to create an Input/Output module for a multi-computing (using SBC machines) environment.
The machines are in the mail right now, but in the while, checking the corresponding documentation I found a problem that I don't know how to resolve.
The idea is to connect the Arduino (Mega 2460) to the SBC through the USB connection. The machine will receive electricity and would be able to establish a Serial/USB communication path. And the Mega will have the Touch Screen attached to it. In this case, the SBC will not have a screen, the Arduino will manage all input and output data for the SBC.
However, it seems that the Elegoo machine communicates with the Arduino through the Serial interface, colliding with my "pretending" usage for the USB as a communication path between the Arduino and the SBC.
The idea of having a Mega and not an UNO, was to have extra ports to perform more tasks that just displaying data or receiving it from the touch part. I know that I could use the extra Serial ports to communicate with the SBC, but I didn't like to increase the quantity of wires in my working environment (it there is no other way, I will use some of the extra ports).
Did somebody have this same problem? Is there a way to have both (USB and Touch Screen) working concurrently? (this is about the configuration, the coding will be sequential).
Is there a way to have both (USB and Touch Screen) working concurrently?
You should post a link to the Elegoo thing you are using. If it were user-friendly, it would have jumpers that let you choose which pins to write serial data and read serial data from. If not-so-user-friendly, the library would let you choose the Serial instance, or SoftwareSerial instance, to communicate between the Elegoo and the Arduino.
Worst case: bend the pins that connect to TX and RX, and solder jumper wires on them and connect them to a different set of TXn and RXn pins.
I received confirmation from Elegoo, that they occupy pin 0 and 1 but they actually don't use them. So there is no problem to use the screen from the Arduino and to communicate concurrently the Arduino with the computer through the USB connection.
This provides a very convenient managed external control interface for many possible uses, at a very reasonable price.
Also, I made a mistake when reading the examples from Elegoo web site. They don't use the Serial instance to communicate with the screen. They make the communication using several parallel digital pins for that purpose.
I still don't have the machine (will arrive to Costa Rica - my country - by sea). But when it arrives, I will provide complete feedback about this.