How To Reassign The MISO Pin?
How To Reassign The MISO Pin?


You can't. The ATmega328P used on the Arduino Uno only has one SPI peripheral, and its I/O pins cannot be reassigned.

As long as the SPI peripheral is active, pin PB4 (pin 12 on the Arduino Uno) is forced to act as an input, regardless of any other configuration on the device. This means that you will need to temporarily deactivate the SPI peripheral while you are communicating with the DHT sensor. The easiest way of doing this will be to call SPI.end() before communicating with the sensor, then calling SPI.begin() afterwards to return the SPI peripheral to its previous state.

Alternatively, you may want to consider using different hardware to reduce your pin congestion. In particular, if you can make the A4 and A5 pins available, you could replace the HD44780 display and DHT temperature sensor with I2C equivalents.