Hello,
Can anyone please share an example of how to use the drv2605 haptic controller board in external trigger mode using the "in" pin being driven by a digital output?
Can I use the board without it being connected to I2C?
Thanks.
drv2605 external trigger mode
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 14194
- Joined: Mon Aug 01, 2016 8:10 pm
Re: drv2605 external trigger mode
You will need the i2c connection to set the mode of the chip.
Do you know which of trigger mode you would like to use? I'm guessing MODE_EXTTRIGEDGE or MODE_EXTTRIGLVL based on your description of a digital in.
https://docs.circuitpython.org/projects ... t/api.html
Do you know which of trigger mode you would like to use? I'm guessing MODE_EXTTRIGEDGE or MODE_EXTTRIGLVL based on your description of a digital in.
Code: Select all
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.
- mofuzz
- Posts: 5
- Joined: Fri May 15, 2015 2:50 pm
Re: drv2605 external trigger mode
Thanks for your reply.
Yes, I was thinking of MODE_EXTTRIGEDGE.
Yes, I was thinking of MODE_EXTTRIGEDGE.
- mikeysklar
- Posts: 14194
- Joined: Mon Aug 01, 2016 8:10 pm
Re: drv2605 external trigger mode
I don't have a working example code for MODE_EXTTRIGEDGE, but You should be able to pass in the value during initialization.
more info here:
; docs
https://docs.circuitpython.org/projects ... it_drv2605
; driver source
https://github.com/adafruit/Adafruit_Ci ... 605.py#L92
; datasheet
https://www.ti.com/lit/ds/symlink/drv2605.pdf
Code: Select all
drv = adafruit_drv2605.DRV2605(i2c, MODE_EXTTRIGEDGE)
; docs
https://docs.circuitpython.org/projects ... it_drv2605
; driver source
https://github.com/adafruit/Adafruit_Ci ... 605.py#L92
; datasheet
https://www.ti.com/lit/ds/symlink/drv2605.pdf
Please be positive and constructive with your questions and comments.