Haptic Evaluation Kit Tutorial: Playing a Specific Haptic Effect
Prerequisite: You have already calibrated the DRV2605 to your selected actuator!
Motor.cpp includes the functionality to play any of the 123 effects and 6 libraries that are stored on the DRV2605. As this is probably going to be the most commonly used function we’ve tried to keep it as simple as possible:
playFullHaptic( library , effect )
Where libraries 1 – 5 can be specified for ERMs or library 6 for LRAs, and any of the 123 effects can be selected.
The Haptic Effect Table is useful for looking up specific effects, or if you’ve found an effect to use whilst in the Engineering Mode you can use the True Haptic Menu Map to find the effect ID.
Remember you will need to have selected a motor and calibrated the DRV2605 it using the functions
selectMotor(); andautoCalibrate(); to use
playFullHaptic();. If you selected an LRA
(motorID = 3)then will
theplayFullHaptic(); ignore the value you enter for library and use library 6.
Playing An Effect Without Calibrating The DRV2605
It is also possible to play a haptic effect with your own values for the rated voltage, overdrive voltage, etc:
playFullHaptic( ratedVoltage , overdriveClamp , LRA , compensation , backEMF , feedback );
This is useful if you want to play an effect without calibrating the DRV2605, or are interested in manually fine-tuning how your motor is driven. See the DRV2605 Library resource for syntax and value ranges.
Note that the DRV2605.cpp version of the function
playFullHaptic(); does not overwrite the stored values from the auto calibration. So to continue to use your own values you must either always call from DRV2605.cpp or use the simpler manually
motor.playFullHaptic( library , effect ); edit the
calibrations[ ] array (defined in line 14 of motor.cpp).
Get in touch
Speak to a member of our team.
Looking for our products?
Reliable, cost-effective miniature mechanisms and motors that meet your application demands.
Resources and guides
Discover our product application notes, design guides, news and case studies.
Explore our collection of case studies, examples of our products in a range of applications.