I am working with a TOS-100 Stepper Driver Shield and am attempting to use the pre-written TMC26XMotorTester/Motor/Serial set of files to make it work.

I unzipped the files, copied the TMC26XStepper folder into the library directory in my Arduino folder, and restarted the Arduino IDE (as well as the Arduino and Driver Shield boards). I also switched the DIR and STEP pins (6 and 7 swapped to match the wiring on my board).

In the TMC26XMotorTester file, I wrote

    #include <TMC26XStepper.h>

so I'm assuming (given everything I've done), that the functions should be available given this file inclusion.

However, I get the error

    TMC26XMotorTester:44: error: 'TMC26XStepper' does not name a type

along with the complete list of functions from the TMC26XStepper.h/.cpp file that were not identified.

Any thoughts? I'm using Arduino-Uno version 1.6.9.

  • Make sure the library folder structure is correct. Inside the TMC26XStepper folder there should be TMC26XStepper.h - If it's in a sub-folder within that it won't work. Some libraries are distributed in folders within zip files, especially some on Github.
    – Majenko
    May 31 '16 at 19:14
  • It was in the TMC26XMotorTester folder as well as the TMC26XStepper-master folder (the 'master' portion is part of the folder name). When I open the TMC26XMotorTester.ino file (located in the TMC26XMotorTester folder), all 5 files appear in my sketch (the one I just mentioned, Motor.ino, Serial.ino, TMC26XStepper.h and .cpp). May 31 '16 at 19:24
  • But I still keep receiving an error. May 31 '16 at 19:25
  • Sounds like you have a mess in your folder structure. Where did you download it from?
    – Majenko
    May 31 '16 at 19:39
  • Just the Github file uploaded by the designer. I don't know why this worked, but I switched my #include <> to #include "TMC26XStepper.h" and it worked, and uploaded. May 31 '16 at 19:47

Arduino libraries are normally written as a C++ Class. When you start a sketch you normally tell the compiler where to find that Class and to Instantiate that class. If the compiler does not find the Class and you attempt to Instantiate it, the compiler will telly you it does not know what to do. That is, it will tell you the thing you are using (TMC26XStepper) does not describe anything or is not a Type.

Study the structure of Arduino libraries to make sure what you have installed agrees with the common Arduino library.

Also, newer version of the Arduino IDE can download and unpack libraries automatically given both the IDE and the library are setup to do this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.