Hi Axel
Thanks for your mail. As you said that the motor is OK under CM tool. But you need to run is under Uno.
Here is one velocity demo for your reference. Velocity_Demo.ino - Google Drive
This is what we can show you.
We are sure this demo is workable.
Thank you @Darrell
Indeed it worked, the problem was the CS pin and I also added two 120 Ohm termination resistors between CAN H and CAN L.
Now it works so it’s perfect.
Would you by any chance have a code for controlling it in Servo mode please?
We are sorry that we do not have the sample code for servo mode. As our engineer is too busy to have it ready.
I can not get an estimated time when the code is ready.
OK, I understand. If I need to make more than 4 turns with the motors, is there a way I can disable this limit in MIT mode?
I’m also curious about why there is that limit.
The limited is from the position loop. our float setting is from -12.5 rad to 12.5 rad, as MIT setting.
If you want to run the motor in more turn, you should choose torque loop or velocity loop.
Hello! I’ve downloaded and used the velocity_demo.ino correctly with the Arduino. I’m just having a hard time understanding the values of the cw() and ccw() routines in the Arduino code - what each of the hex values are supposed to be, in relation to the cubemars guide. If you could just break down those two, that would help me a lot. Thank you!
@Darrell I tried the code that you provided but i did not work please help:
i am using the following:
Arduino uno, mcp2515_can module, AK45-36KV80 motor from cube mars
the connection as the following:
SCK ↔ D13
SI ↔ D11
SO ↔ D12
CS ↔ D9
GND ↔ GND
VCC ↔ 5V
CANH ↔ CANH
CANL ↔ CANL
I also connect the jumper pin in the mcp2515_can module to enable the resistor
i am using external power source 24volts.
i uploaded your code to my arduino but the motor did not stat at all in the serial monitor said “CAN BUS Shield inCAN BUS Shield init ok!”
please help to solve this issue and thanks in advance