Qwiic Haptic Driver DA7280 Hookup Guide

Pages
Contributors: bboyho, Elias The Sparkiest
Favorited Favorite 1

Example 1: I2C Mode

We're just going to look the I2C_Mode.ino example. Open the File > Examples > SparkFun Qwiic Haptic Driver DA7280 Arduino Library > I2C_Mode. Select your board (in this case Arduino Uno) and COM port. Then hit the upload button.

Once uploaded, the Qwiic Haptic Driver should begin vibrating every half a second. Note that the value for hapDrive.setVibrate() range from 0 to 127. A value of 0 turns the motor off while a value of 127 turns the motor fully on. Try adjusting the value to a higher intensity. If the motor does not vibrate, try uncommenting the code to clear the interrupt.