osiota-app-gpio
v1.0.5
Published
This application reads input states of GPIO pins
Downloads
2
Readme
osiota application gpio
Osiota is a software platform capable of running distributed IoT applications written in JavaScript to enable any kind of IoT tasks. See osiota.
Configuration: gpio
This application reads input states of GPIO pins.
Properties
|Name|Type|Description|Required|
|----|----|-----------|--------|
|pin(Pin number)|number
|Not GPIO number (See pin naming)|yes|
|invert(Invert Input Value)|boolean
|e.g. for a pull down circuit|no|
|map(Actions)|object[]
||no|
Additional Properties: not allowed Example
{
"pin": 7,
"invert": true,
"map": [
{
"type": "press",
"node": "/my-switch"
},
{
"type": "longpress",
"node": "/my-switch-long"
}
]
}
map[]: Actions
Items: Action
Item Properties
|Name|Type|Description|Required|
|----|----|-----------|--------|
|type(Switch Type)|string
|Enum: "switch"
, "press"
, "longpress"
|yes|
|node(Node Name)|string
||no|
Example
[
{
"type": "press",
"node": "/my-switch"
},
{
"type": "longpress",
"node": "/my-switch-long"
}
]
How to setup
Add a configuration object for this application, see osiota configuration:
{
"name": "gpio",
"config": CONFIG
}
License
Osiota and this application are released under the MIT license.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.