Skip to content

Implement Gyro #586

@Mysticial

Description

@Mysticial
Collaborator

Now that we have ESP32 working, I tried to implement an API for the 6-axis gyro. The idea here is to create an easy-to-use API do to basic motions. That way we can automate LGPE catching (among other things).

So far I've added a crude API to send raw gyro values to the Switch. However, I can't make sense of it.

  • Sending in simple raw values causes drastic motions with little in between.
  • There appears to be some stuck-sensor detection that may cause the Switch to ignore the gyro inputs. Adding noise to the sensor values seems to help a bit.
  • Gyro values can "get stuck". I send some non-zero values. Then I start sending zeros again. The non-zero values will often stick until replaced with other values or going in and out of home.
  • There seems to be some "derivative" logic going on which doesn't play well with artificial inputs where the raw values drastically swing from one extreme to another in an instance.

In short, I don't understand the behavior. We need to capture some real gyro data to understand how the values work. Looking at other projects, Joycontrol doesn't support gyro either. Joycon Droid does have it and it's implementation has to surprises with respect to what's been documented. It's unclear if it actually does what we want.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Mysticial

        Issue actions

          Implement Gyro · Issue #586 · PokemonAutomation/Arduino-Source