# Esp32 switching multiple MISO / MOSI pins

**URL:** <https://forum.arduino.cc/t/esp32-switching-multiple-miso-mosi-pins/1023800>\
**Category:** Networking, Protocols, and Devices\
**Created:** [August 19, 2022, 3:34pm UTC](https://forum.arduino.cc/t/esp32-switching-multiple-miso-mosi-pins/1023800 "2022-08-19T15:34:54Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![cvhuis](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cvhuis/32/1109288_2.png) [@cvhuis](https://forum.arduino.cc/u/cvhuis)\
**Post date:** [March 12, 2023, 5:55pm UTC](https://forum.arduino.cc/t/esp32-switching-multiple-miso-mosi-pins/1023800/14 "2023-03-12T17:55:08Z")

</div>

Arduino ESP32 TFT test:

With special TFT\_eSPI  
Proposed ports modified  
Then upload from Test\_Touch\_Controller.ino  
Comes with error missing TFT\_driver ILI9341 driver  
Copied from original TFT\_eSPI  
Upload again, then missing touch.h file in extensions  
Also copied from original  
Then upload, no errors  
Then serial monitor: x:8191 Y:8191 z:4095  
setup\_user.h modified to ST7796 driver

Same output

In setup\_user.h  
#define TFT\_RST 12 modified #define TFT\_RST -1  
Then output x:0 y:0 z:4095

With sketch demo\_3D\_cube white screen  
Tried different drivers, no success  
Then command #define USE\_SEPERATE\_TOUCH\_BUS out, then sketch will work with your Library.

Next test:

In the user\_setup.h the line //#define TFT\_MISO 12 is commanded out  
Then upload the following sketch:

```cpp
#include <TFT_eSPI.h>
#include <TAMC_GT911.h>
#include <DigitalRainAnimation.hpp>

#define TOUCH_SDA 33
#define TOUCH_SCL 32
#define TOUCH_INT 21
#define TOUCH_RST 25
#define TOUCH_WIDTH 320
#define TOUCH_HEIGHT 240

TAMC_GT911 tp = TAMC_GT911(TOUCH_SDA, TOUCH_SCL, TOUCH_INT, TOUCH_RST, TOUCH_WIDTH, TOUCH_HEIGHT);

TFT_eSPI tft = TFT_eSPI();
DigitalRainAnimation<TFT_eSPI> matrix_effect = DigitalRainAnimation<TFT_eSPI>();

void setup() {
  Serial.begin(115200);
  Serial.println("TAMC_GT911 Example: Ready");
  tp.begin();
  tp.setRotation(ROTATION_NORMAL);

 tft.begin();
  tft.setRotation(0);

  matrix_effect.init(&tft);
  matrix_effect.setTextColor(0, 0, 255);
  matrix_effect.setHeadCharColor(0, 255, 255);

  
}

void loop() {

matrix_effect.loop();

  tp.read();
  if (tp.isTouched){
    for (int i=0; i<tp.touches; i++){
      Serial.print("Touch ");Serial.print(i+1);Serial.print(": ");;
      Serial.print(" x: ");Serial.print(tp.points[i].x);
      Serial.print(" y: ");Serial.print(tp.points[i].y);
      Serial.print(" size: ");Serial.println(tp.points[i].size);
      Serial.println(' ');
    }
  }
}

```

Screen has the matrix affect and i have touchscreen output in monitor

---

_[View the full topic](https://forum.arduino.cc/t/esp32-switching-multiple-miso-mosi-pins/1023800)._
