Does the mc_api actually do anything?
I'm a complete beginner following the motor control tutorial here:
It tells me that this code will get my motor running.
while (1)
{
MC_StartMotor1();
HAL_Delay(2000);
MC_StopMotor1();
}Well I've followed the whole tutorial, creating a project from scratch and I think I can safely say that it doesn't do what it's supposed to do.
I know the program is running as I have an LED flashing under my control each time it goes round the loop but the motor does not move. The motor is known to work. Looking at the api, this function just returns another function in mc_interface:
MCI_StartMotor(MCI_Handle_t *pHandle)I do not know where this second function is supposed to get the pointer from - the wrapping function doesn't supply it. Perhaps it is initialised somewhere else - to me it looks suspect. Is it worth bothering with this tutorial or should I just get on with using mc_interface and initialise the pointer myself?
For completeness my loop is like this:
while (1)
{
blink(400, 1, 4);
blink(400, 2, 3);
blink(400, 3, 2);
blink(400, 4, 1);
HAL_Delay(1000);
MC_StartMotor1();
HAL_Delay(2000);
MC_StopMotor1();