You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Wonderful. Purely for my own understanding, why would configuring the pin with pin mode cause the SPI to break? Does it disable the SPI interface?
In Arduino 3.0.0 there is a new feature called Peripheral Manager.
In the specific case of SPI, when any of its 4 pins (MOSI, MISO, CLK and CS) are used for any other function, for instance, with pinMode(), the whole SPI is detached. Therefore, SPI stops working, being necessary to restart it with SPI.begin().
I think that your example brings a good questioning because most displays will only care about using MOSI and not MISO.
I could also use CS pin for something else and only set it as CS whenever it is necessary.
Therefore, I would say that we may review it in order to allow using SPI pins partly.
As a user, it also would have been sufficient to note in the documentation that pinMode-ing any of the pins used for SPI would stop SPI. But it of course would have also been nice if it just worked 😄
In Arduino 3.0.0 there is a new feature called Peripheral Manager.
In the specific case of SPI, when any of its 4 pins (MOSI, MISO, CLK and CS) are used for any other function, for instance, with
pinMode()
, the whole SPI is detached. Therefore, SPI stops working, being necessary to restart it withSPI.begin()
.I think that your example brings a good questioning because most displays will only care about using MOSI and not MISO.
I could also use CS pin for something else and only set it as CS whenever it is necessary.
Therefore, I would say that we may review it in order to allow using SPI pins partly.
Originally posted by @SuGlider in #9040 (comment)
The text was updated successfully, but these errors were encountered: