SPI on M5Tough (MAX31865)
-
I have done several projects with the M5Tough and I really love the device. However I need an SPI connection now on the M5Tough to communicate with a MAX31865 for reading out temperatures from a PT100. This is a real requirement I can not use something else than a PT100!
I always use Arduino code for the M5Tough, how can I configure the pins on the extensions board as (software) SPI pins and have it working with the Adafruit arduino Library?
Can you please get me started/help me out here please? -
Hello @GrtVHecke
software SPI can be assigned to almost any GPIO - just select four GPIOs available on port A (GPIO33 / 32), port B (GPIO36 / 26) and C (GPIO13 / 14).
Note: GPIO36 can only be an inputIn you sketch use this line:
// Use software SPI: CS, DI, DO, CLK Adafruit_MAX31865 thermo = Adafruit_MAX31865(<CS>, <MOSI>, <MISO>, <SCK>);Thanks
Felix -
@felmue thank you for this quick and excellent reply!!! I will do this. Can you just tell me if I need to specify the pins as GPIO33 or 33 in the constructor
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login