Quantcast
Channel: Motor drivers forum - Recent Threads
Viewing all articles
Browse latest Browse all 14309

DRV2605L: Need help with the setWaveform for DRV2605L

$
0
0

Part Number:DRV2605L

Hello,

Can someone please explain to me what is happening here, especially the highlighted section drv.setWaveform?

The source of this code is 'Arduino library for Adafruit DRV2605L Haptic Controller':

#include <Wire.h>
#include "Adafruit_DRV2605.h"

Adafruit_DRV2605 drv;

void setup() {
  Serial.begin(9600);
  Serial.println("DRV test");
  drv.begin();
   
  // I2C trigger by sending 'go' command
  drv.setMode(DRV2605_MODE_INTTRIG); // default, internal trigger when sending GO command

  drv.selectLibrary(1);
  drv.setWaveform(0, 84);  // ramp up medium 1, see datasheet part 11.2
  drv.setWaveform(1, 1);  // strong click 100%, see datasheet part 11.2
  drv.setWaveform(2, 0);  // end of waveforms
}

void loop() {
    drv.go();
    delay(1000);
}


Viewing all articles
Browse latest Browse all 14309

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>