Skip to content

This application reads input states of GPIO pins

License

Notifications You must be signed in to change notification settings

osiota/osiota-app-gpio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

This application reads input states of GPIO pins

Resources

License

Stars

Watchers

Forks

Packages

No packages published