teemuatlut / TMCStepper

MIT License
514 stars 202 forks source link

TMC5160 Wiring with arduino #186

Open Hammadiqbal12 opened 3 years ago

Hammadiqbal12 commented 3 years ago

I have a TMC5160 V1.2 and I want to use it with arduino Nano, I tried the Simple example code but it didn't work for me. Please guide me in following parts.

  1. Do I need to connect all the SPI pins or only CS, EN, DIR and STEP pins are enough for this example code? I'm using this

    define EN_PIN 6 // Enable

    define DIR_PIN 4 // Direction

    define STEP_PIN 5 // Step

    define CS_PIN 7 // Chip select

define R_SENSE 0.075f

TMC5160Stepper driver(CS_PIN, R_SENSE);

  1. If I need to use SPI pins, please indicate the SPI pins on TMC5160.

Thank you.

teemuatlut commented 3 years ago

Yes, you do need to connect SPI. The SPI pins on the TMC5160 are SDI, SCK, CSN and SDO.

daniel-frenkel commented 3 years ago

please indicate the SPI pins on TMC5160

You need to read the datasheet of your TMC5160 to find the SDI, SCK, CSN and SDO pins