Skip to content
Snippets Groups Projects
Commit 0c5af2c8 authored by Patrick Joos's avatar Patrick Joos
Browse files

Extended examples for tap

parent 25480834
Branches
No related tags found
No related merge requests found
Pipeline #247378 passed
......@@ -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.
![SNES Controller](../images/1000px-SNES-Controller-in-Hand.jpg)
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.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment