@@ -21,6 +21,8 @@ The [JSON Schema](https://json-schema.org/) for `Tap` is as follows:
}
```
`tap` should always be sent when the state of the device it's modeling changes. E.g. when a user presses a button, the state `true` will be sent. When they release the button again, `false` will be sent.
## Examples
The following json shows an expected data transmission:
...
...
@@ -34,3 +36,11 @@ The following json shows an expected data transmission:
Tap is the simplest of all interfaces. It can be modeled by a simple press of a button, e.g. on a gamepad or a key on a keyboard.
This can be used in a variety of ways. As stated, only state-changes should be transmitted. This can therefore be used for
- measuring how long a user presses a button.
- how precise a user can be with certain inputs (e.g. ask the user to hold a button precisely 5 seconds)
- Count how often a button is pressed in a certain time period
This could also be used to transmit settings. If e.g. an ergometer has a setting where it allows for ERG mode (as in, the ergometer modulates resistance so that the user has to provide a constant wattage), it can transmit this setting using a `tap` port.