12c

has anyone tried using the 12 C pins on the expansion port. do they use standard Arduino language? Thanks

Yup, standard Arduino. They are in use by the accelerometer and the magnetometer, but if you’re not using those it shouldn’t be a problem. Any hints what you want to do with it?

Well, I finally broke down and bought a motor shield, a 12v power supply and two NEMA 17 stepper motors. Tried to hook them up, using the SDA/SCL pins on Sparki’s expansion slot and then I ran the Arduino 1.6.7 IDE with the sample stepper motor test .ino. The good news is that I got Sparki to upload and run the program. I could see the code looping on the serial monitor. In addition, I had some varying voltages at the SDA/SCL pins, so obviously some type of a signal was going through. But, unfortunately, nothing happened at the motor end. I tried running the code using the Sparkiduino IDE as well, but the StepperMotor code references the Arduino IDE and the wire.H library, which seems to have enough incompatibilities to keep it from running on the Sparkiduino IDE. I’m trying for technical support from the folks where I bought the motor shield, but so far nothing. If anyone has any thoughts it would be greatly appreciated. The code I’m trying to run is

[code]
*/
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include “utility/Adafruit_MS_PWMServoDriver.h”

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
// Or, create it with a different I2C address (say for stacking)
// Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61);

// Connect a stepper motor with 200 steps per revolution (1.8 degree)
// to motor port #2 (M3 and M4)
Adafruit_StepperMotor *myMotor = AFMS.getStepper(200, 2);

void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println(“Stepper test!”);

AFMS.begin(); // create with the default frequency 1.6KHz
//AFMS.begin(1000); // OR with a different frequency, say 1KHz

myMotor->setSpeed(10); // 10 rpm
}

void loop() {
Serial.println(“Single coil steps”);
myMotor->step(100, FORWARD, SINGLE);
myMotor->step(100, BACKWARD, SINGLE);

Serial.println(“Double coil steps”);
myMotor->step(100, FORWARD, DOUBLE);
myMotor->step(100, BACKWARD, DOUBLE);

Serial.println(“Interleave coil steps”);
myMotor->step(100, FORWARD, INTERLEAVE);
myMotor->step(100, BACKWARD, INTERLEAVE);

Serial.println(“Microstep steps”);
myMotor->step(50, FORWARD, MICROSTEP);
myMotor->step(50, BACKWARD, MICROSTEP);
}[/code]

I’ve tried a number of things to get the new motors up and running with the motor shield connected to sparki, but so far no luck.
In addition to connecting the SDA and SCL pins between Sparki and the motor shield, I also hooked up a gnd connection. I ran a I2c scanner and confirmed that the shield was detected at address 060. I modified the code to include #define NO_ACCEL 1 and #define NO_MAG 1. I confirmed the coil resistance of the motors and that the shield has sufficient power. I verified that I’m getting varying voltages between 0 and 3 volts at the SDA and SCL pins when the code is running. I copied the latest sparki library to the Arduino directory in My Documents. The code ran fine with the Leonardo board selected but no motor action, so I copied the Sparki Board.txt to the Arduino program directory. I also copied the Sparki Variant directory to the Arduino hardware directory. The code ran in this configuration with the Sparki Board selected, but still no motor action. Any suggestions would be appreciated. They’ve run out of things to try at tech support where I bought the motor shield. Hopefully someone will have an idea. I’d really like to use the Sparki platform for this since I’ve got so much time invested in the code for my project. Thanks again.