We want to accomplish that the Arduino reacts to presses on a TFT screen when a particular picture is displayed on the screen. The screen is installed on top of the Arduino.
We think that this picture will help in understanding the set-up.
[
When the Arduino detects a press, it should activate the motor (yellow, left in the picture).
Can this be achieved with one Arduino?
The thing is that no plug-in location is free in the Arduino after we plug in the TFT screen.
Therefore, we are using a second Arduino for controlling the motor.
However, we are wondering if it is possible to carry out our project with only one Arduino.
If this is not the case, how is it possible that two Arduinos communicate with each other?
Sorry, that jumble of wires is not going to help in telling us how you have set up your project. It’s spaghetti. At the very least provide a detailed list of which pin of which part is connected to what specific pin of another device you have.
I have no clue what screen that would be. Provide details please. Maybe it has pins that seem to stick into the underlying Arduino but are not actually connected or used. Many LCD screens have a touch sensitive layer. Measuring those analog outputs should be possible for Arduino 1.
Also, I presume the red pcb is a motor driver or H-bridge. Please provide details also on that.
Yes, it can be done with one Arduino from a technical point of view. It looks like the TFT “shield” covers all the Arduino UNO pins, but it will only be using a couple of them while the rest will be unconnected. Which TFT shield do you have? The datasheet will tell you which pins are used, so you can connect those with wires and not cover up all the unused pins.
It is easy to check for a “press” - either checking for the pin level in the main program, or using a pin-change interrupt. I suggest you try the first, as programming interrupts is somewhat more work and more complicated.