🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    SPI on M5Tough (MAX31865)

    Scheduled Pinned Locked Moved Cores
    3 Posts 2 Posters 4.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G Offline
      GrtVHecke
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by

        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 input

        In you sketch use this line:

        // Use software SPI: CS, DI, DO, CLK
        Adafruit_MAX31865 thermo = Adafruit_MAX31865(<CS>, <MOSI>, <MISO>, <SCK>);
        

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • G Offline
          GrtVHecke
          last edited by

          @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

          1 Reply Last reply Reply Quote 0

          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
          • First post
            Last post