Spare pins with R4 and DIYables 3.5 TFT touch Displa

I am using the DIYables 3.5 TFT Touch displays with an Arduino UNO R4 WiFi. Everything is working very well, so far.

However, I need also to be able to use two digital pins, one as a digital input, reading a temperature, and one as a digital output, driving a relay.

Are there at least two pins not being used by the display that I can use safely for these purposes?

I’ve searched for an answer with no success.

Thank you, Ralph

Can you not just look at the board and see? Becxause I can't, you didn't post a wiring diagram or the code.

Because the display is a shield, there is no "wiring diagram” and I’m not sure how my code would help. The library that uses the pins directly is <DIYables_TFT_Touch_Shield.h> and is on GitHub. I am not experienced enough, nor clever enough, to plough through the library source code to work out which pins are not used.

I received a a very helpful reply from DIYables. I thought I would share it for the benefit of others:

"Regarding your question, the shield uses the following pins: D2, D3, D4, D5, D6, D7, D8, D9, A0, A1, A2, A3, A4

It means that you can freely use the following pins for other purposes: DO, D1, D10, D11, D12, D13, A5.
However:

  • if you use the SDcard, you cannot use D10, D11, D12, and D13.
  • if you use Serial, you cannot use D0 and D1.

Please note that pin A5 can be used as digital or analog.”

Thanks,

Ralph

1 Like

See how easy it is when all the relevant info is disclosed.

Actually, since you're using an Uno R4, you can use Serial and D0 and D1 are still available, as they're (optionally) used for Serial1, not Serial as in the R3.

1 Like

Thank you, van_der_decken, that is a very good point! Those two pins are particularly useful as they are not covered by the headers on the display shield and so are more accessible.

Thanks, Ralph

Yes, it is correct, As @ralpnc and @van_der_decken said.

For anyone who searching for the awnser in the future and reach this thread, please refer to the below table for pin map:


You can get more information on the product page of 3.5 inch TFT Touch Shield