effgee and sgm2o2, I feel your pain. I went around in circles for far too long before I figured out:
- Download the .zip
- Extract the files — I get a folder named “dsPin_example” with 4 “.ino” files in it.
KEY STEP: rename the folder to “dSPIN.example” (without the quotes). (On my system, it doesn’t even compile unless I get the capitalization exactly right)
double-click on the “dSPIN_example.ino” file (resist the temptation to click on the “dSPIN_main.ino” file)
- The Arduino IDE should start right up and show all 4 files in tabs at the top. (You have already downloaded and installed the Arduino IDE from http://arduino.cc/en/Main/Software , right?)
- You hit the “dSPIN_main.ino” and let the Arduino create new folders, didn’t you? Close the Arduino IDE, put all 4 files back into the “dSPIN.example” folder, and delete the empty folders that the IDE created. Double-click on the “dSPIN_example.ino” file.
- In the Arduino IDE, hit the right-arrow “compile and upload” button.
I suspect that might be all you need to do if you have an Arduino Uno. But if you have an Arduino Mega2560 like I do,
- Change the pin map in “dSPIN_example.ino” as recommended in http://forum.arduino.cc/index.php/topic,27395.0.html so SLAVE_SELECT_PIN , MOSI , MISO , and SCK are defined as the correct pins for the Arduino Mega2560
- Actually wire up the Arduino and the motor as per the pins defined in “dSPIN_example.ino”.
- Hit the right-arrow “compile and upload” button.
Is there some way to fix that library so it automagically uses one set of pins for the Arduino Uno and a different, but still correct, set of pins for the Arduino Mega2560?