adafruit_drv2605
¶
CircuitPython module for the DRV2605 haptic feedback motor driver. See examples/simpletest.py for a demo of the usage.
- Author(s): Tony DiCola
-
class
adafruit_drv2605.
DRV2605
(i2c, address=90)[source]¶ TI DRV2605 haptic feedback motor driver module.
-
library
¶ The library selected for waveform playback. Should be a value of:
- LIBRARY_EMPTY: Empty
- LIBRARY_TS2200A: TS2200 library A (the default)
- LIBRARY_TS2200B: TS2200 library B
- LIBRARY_TS2200C: TS2200 library C
- LIBRARY_TS2200D: TS2200 library D
- LIBRARY_TS2200E: TS2200 library E
- LIBRARY_LRA: LRA library
See the datasheet for the meaning and description of effects in each library.
-
mode
¶ The mode of the chip. Should be a value of:
- MODE_INTTRIG: Internal triggering, vibrates as soon as you call play(). Default mode.
- MODE_EXTTRIGEDGE: External triggering, edge mode.
- MODE_EXTTRIGLVL: External triggering, level mode.
- MODE_PWMANALOG: PWM/analog input mode.
- MODE_AUDIOVIBE: Audio-to-vibration mode.
- MODE_REALTIME: Real-time playback mode.
- MODE_DIAGNOS: Diagnostics mode.
- MODE_AUTOCAL: Auto-calibration mode.
See the datasheet for the meaning of modes beyond MODE_INTTRIG.
-
sequence
¶ List-like sequence of waveform effects. Get or set an effect waveform for slot 0-6 by indexing the sequence property with the slot number. A slot must be set to either an Effect() or Pause() class. See the datasheet for a complete table of effect ID values and the associated waveform / effect.
E.g. ‘slot_0_effect = drv.sequence[0]’, ‘drv.sequence[0] = Effect(88)’
-