Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple DRV 2605 ERM haptics #6

Merged
merged 4 commits into from
Nov 22, 2022
Merged

Simple DRV 2605 ERM haptics #6

merged 4 commits into from
Nov 22, 2022

Conversation

finger563
Copy link
Contributor

Description

  • Refactored I2C code in components/box-emu-hal out of i2s_audio and input and into its own i2c.hpp/cpp to simply expose internal i2c bus (touchpad, audio codecs, imu) and external i2c bus (gamepad, haptics, encoder, etc.) for easier use
  • Added drv2605 component which allows you to set a waveform (or waveform sequence) and then play it
  • Added drv2605 to main code and play a STRONG_CLICK when booting up and when selecting a rom

Motivation and Context

  1. Haptics are cool
  2. Right now we have no loading UI (while rom is being copied into flash and such) so haptics provide a nice / easy way to let the user know that their action is doing something.

How has this been tested?

By running it and seeing the little vibration motor move when I select a rom.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

…i2c code. made it clear which is external i2c and which is internal i2c. added drv2605 to main code and initialize it during bootup. when rom is selected, play the haptic.
@finger563 finger563 merged commit 50672ca into main Nov 22, 2022
@finger563 finger563 deleted the feature/drv2605-haptics branch November 22, 2022 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant