Thanks for the replies.
I'm heading out to work soon, so can't provide those things just yet.
I guess the main crux of my question was "Is there anything different between the Uno and the Nano, which could cause the issue?" Rather than help with any wiring.
I saw a post about the Nano, mentioning MISO MOSI and SCK pins, but don't know if that means anything for me with this setup. I have a switch wired to 11 and 12, and two momentary buttons wired to 10 and 13.
I'll provide the requested info as soon as I can, but was just wondering if there was something that clashes with these pins.
Quick edit - this is what I can give now:
/// Open loop motor control example
#include <SimpleFOC.h>
bool doonce = 1;
int debouncetime = 10000;
const int BUTTON_PIN = 10;
int input4Pin = 13;
int input3Pin = 12;
int input2Pin = 11;
int input1Pin = 10;
// this declares each of our buttons and their pins
// make sure that you use the pins your buttons are wired to
// BLDC motor & driver instance
// BLDCMotor motor = BLDCMotor(pole pair number);
BLDCMotor motor = BLDCMotor (11);
// BLDCDriver3PWM driver = BLDCDriver3PWM(pwmA, pwmB, pwmC, Enable(optional));
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 5, 6, 8);
// Stepper motor & driver instance
//StepperMotor motor = StepperMotor(50);
//StepperDriver4PWM driver = StepperDriver4PWM(9, 5, 10, 6, 8);
void setup() {
pinMode(input4Pin, INPUT_PULLUP);
pinMode(input3Pin, INPUT_PULLUP);
pinMode(input2Pin, INPUT_PULLUP);
pinMode(input1Pin, INPUT_PULLUP); // these lines declare each of the buttons as an input
// driver config
// power supply voltage [V]
driver.voltage_power_supply = 4.448; //12 then 4.4
// limit the maximal dc voltage the driver can set
// as a protection measure for the low-resistance motors
// this value is fixed on startup
driver.voltage_limit = 12; //12
driver.init();
// link the motor and the driver
motor.linkDriver(&driver);
// limiting motor current (provided resistance)
motor.current_limit = 0.058824; // [Amps was 0.35 0.058824]
motor.voltage_limit = 1;
// open loop control config
motor.controller = MotionControlType::velocity_openloop;
// init motor hardware
motor.init();
Serial.begin(115200);
Serial.println("Motor ready!");
Serial.println("Set target velocity [rad/s]");
_delay(1000);
motor.disable(); // stops motor
}
void loop() {
// read the state of the switch/button:
int buttonState = digitalRead(BUTTON_PIN);
// print out the button's state
Serial.println(buttonState);
// button on pin 10
if (digitalRead(10)==LOW) { // high state means on
motor.disable(); // stops motor
}
// button on pin 11
if (digitalRead(11)==LOW) { // high state means on
motor.move(3.484); // this button sets the speed to 33.3rpm
}
// button on pin 12
if (digitalRead(12)==LOW) { // high state means on
motor.move(4.709); // this button sets the speed to 45rpm 39.071
}
// button on pin 13
if (digitalRead(13)==LOW) { // high state means on
motor.enable(); // starts motor
doonce = 1;
delay(debouncetime);
}
}
The only thing different from last time (when it worked) is the Nano, where the ground pins are jumpered over to another section for to put thm all on one ground, and I literally just broke off one of the switch wires when taking this pic - so the wire to pin 11 is pissing in the pics.
The driver is a SimpleFOCMini 1.0 (probably clone, but works with the Uno)
Board is a clone Nano (Old Bootloader)
I can provide an attempt at a wiring diagram when I get home later.
Same setup works on the UNO, but not the nano. The Motor just pulses in this setup.