Skip to content

Warning : Example code spins motor up to high rpm #2

@VeryOldFrank

Description

@VeryOldFrank

In the example, the section that moves the motor writes
0x1000 rpm per second max acceleration
0x1000 rpm per second max acceleration
0x1000 rpm target motor speed
The comment each time says that this is 1000rpm.
Problem: This is misleading and potentially somewhat dangerous
What happens is that 1000 Hex is written and the motor is spun up to 4096rpm (decimal).
It is also accelerating and decelerating at 4096rpm per second.
I would recommend that
a) Code: for an initial proof of motor movement, a much lower speed and acceleration would be chosen. So change 0x1000 to 0x20 everywhere and change the comment to indicate that this is 81rpm in decimal.
b) Environment: Make sure everything is safe - your motor's axis should be physically disconnected from external machinery.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions