I’ve been trying to get the basic SIK code for the motor control working and seem to be missing something obvious.
I’ve tried it on 2 Arduinos so far, even tried putting an extra 4.5V pack on the power rails on the breadboard but can’t get it working. Is there a trick to it or am I extremely unlucky?
Not sure how to present the schematic & board so have used a camera
Code:
// named constants for the switch and motor pins
int motorPin = 9; // the number of the motor pin
void setup() {
// initialize the motor pin as an output:
pinMode(motorPin, OUTPUT);
}
void loop() {
// turn motor on:
digitalWrite(motorPin, HIGH);
//analogWrite(motorPin, 100);
}
Sorry to hear you are having issues. Have you tested the motor on it’s own? A quick connection to power will confirm the motor is working properly. If that works, I would need more description of the behavior when the circuit is attempting to operate. Does it whine? Does it move at all? If you have the circuit set to spin the motor (when it isn’t spinning) if you twist the motor shaft with your fingers can you “jump start” the motor?
Thanks for your help - even though I’d tried 2 different motors I had made the assumption that SparkFun had supplied compatible motors, more fool me. I tried it with a solar motor on the off chance which of course worked fine.
I actually feel angry about time spent fiddling around!!