3

I am in process of writing a .NET library for PoweredUp and I am currently trying my luck with the Gesture sensor in the TechnicMediumHub (aka Control+ Hub).

Below the dump of the Port(Mode)Information messages.

  Port: 100
    IOTypeId: TechnicMediumHubGestSensor
    HardwareRevision: 0.0.0.1
    SoftwareRevision: 0.0.0.1
    OutputCapability: False
    InputCapability: True
    LogicalCombinableCapability: False
    LogicalSynchronizableCapability: False
    ModeCombinations: []
    UsedCombinationIndex: 0
    MultiUpdateEnabled: False
    ConfiguredModeDataSetIndex: []
    Mode: 0
      Name: GEST
      IsInput: True
      IsOutput: False
      RawMin: 0
      RawMax: 4
      PctMin: 0
      PctMax: 100
      SIMin: 0
      SIMax: 4
      Symbol:
      InputSupportsNull: False
      InputSupportFunctionalMapping20: True
      InputAbsolute: False
      InputRelative: False
      InputDiscrete: True
      OutputSupportsNull: False
      OutputSupportFunctionalMapping20: False
      OutputAbsolute: False
      OutputRelative: False
      OutputDiscrete: False
      NumberOfDatasets: 1
      DatasetType: SByte
      TotalFigures: 1
      Decimals: 0
      DeltaInterval: 0
      NotificationEnabled: False

Value is discrete and can be between 0 and 4. Which would conclude to 4-5 gestures. SPIKE Prime specification list 3 gestures: free fall, tap, shake. I rudimentary mapped them the following ... however .. the sensor emits many of them for the free fall and tapping is a pretty rough gesture. So that could be also crash or something.

    public enum Gesture : int
    {
        None = 0, // UNSPECED
        Tap = 1, // UNSPECED
        Gesture_2 = 2,
        Shake = 3, // UNSPECED
        FreeFall = 4, // UNSPECED
    }

So my question: Does anyone have a proper mapping (and not an educated, not complete guess like mine) for these gestures?

This site is temporarily in read only mode and not accepting new answers.

Browse other questions tagged .