Import Effects
Download the 'lite' version of the library to work with effects imported from Feelix
Version 2.2.3 of the SimpleFOC library may not be compiling, downgrade to an older version to resolve the issue
Initialize an exported effect
The code generated during export can be pasted in the FeelixEffect library ('lite' version).
Additionally, the motor has to be initialized as shown here.
Play an exported haptic effect
Play an exported velocity effect
Access variables motor
The feelix.run() updates the following variables that can be accessed in the code:
The current angle of the motor in radians (float)
The velocity of the motor in rad/s (float)
The time since the program started is saved in (long) current_time, the time can be reset when the (long) start_time variable is set to millis()
Get the direction in which the motor is rotating, clockwise (1) and counterclockwise (-1).
Change sensor direction opposed to motor direction
Change effect settings
Enable effect (effects are enabled by default)
Disable effect
Check if an effect is enabled
Start velocity effect
Stop velocity effect
Change scale
scale.x changes the angle (position/torque effects) or the duration (velocity), and scale.y changes the intensity (voltage %), velocity (velocity %), or degrees. Depending on the type of effect (torque, position, velocity over time, or angle over time)
Loop velocity effect
Repeat a haptic effect every rotation
Disable effect in clockwise direction or counterclockwise direction (haptic only)
Last updated