Home » Technical Resources » Haptic Evaluation Kit Tutorial: Playing a Specific Haptic Effect

Haptic Evaluation Kit Tutorial: Playing a Specific Haptic Effect

Looking for our Haptics range? View our main Haptics hub here.

Prerequisite: You have already calibrated the DRV2605 to your selected actuator!

DRV2605 Effect Table

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.

Engineering Mode’s True Haptic Menu Map

Remember you will need to have selected a motor and calibrated the DRV2605 it using the functionsselectMotor(); andautoCalibrate(); to use playFullHaptic();. If you selected an LRA (motorID = 3)then willtheplayFullHaptic(); 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 functionplayFullHaptic(); 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 manuallymotor.playFullHaptic( library , effect ); edit the calibrations[ ] array (defined in line 14 of motor.cpp).

Female wearing a phone headset and sat in front of a desktop computer. In the background, other team members are sat at desks working.

Get in touch

Speak to a member of our team.


Motor catalogue

Looking for our products?

Reliable, cost-effective miniature mechanisms and motors that meet your application demands.

Newsletter

Sign up to receive new blogs, case studies and resources – directly to your inbox.

Sign up