Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example: platform: Install gpio module #31

Merged
merged 1 commit into from
Aug 29, 2018

Conversation

rzr
Copy link
Contributor

@rzr rzr commented Aug 29, 2018

Using sysfs

Change-Id: I5cb06e6d98a10924bdff1b5988996c610f64081a
Signed-off-by: Philippe Coval p.coval@samsung.com

Using sysfs

Change-Id: I5cb06e6d98a10924bdff1b5988996c610f64081a
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
@rzr rzr force-pushed the sandbox/rzr/review/master branch from 454942a to 64ad82f Compare August 29, 2018 13:04
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
Note that gpio_key could overlap, see later makefile

Change-Id: I0de4ace8a21a0592e5e09e692d43aa04ed7488e8
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
Usage:

    node example/platform flex-phat

Change-Id: I3612e28ae50d5bd14f5f4b06c5e0dbead7a84a92
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
To setup GPIOs, it will be used also for IoT.js

Usage:
```
make -C example/platform/ flex-phat

log: board: flex-phat: Loading
Usage:
/home/pi/.nvm/versions/node/v8.11.3/bin/node /tmp/pi/mnt/local/local/home/philippe/var/cache/url/git/ssh/github.com/tizenteam/webthing-node/src/webthing-node/example/platform/index [board] [port]
Try:
curl -H "Accept: application/json" http://localhost:8888

log: board: flex-phat: Started
log: GPIO: GreenLED: open:
log: GPIO: BlueLED: open:
log: GPIO: Relay: open:
log: GPIO: RedLED: open:
log: GPIO: Button: open:
log: GPIO: GPIO23: open:
log: GPIO: Button: change: false
log: GPIO: Button: change: true
log: GPIO: RedLED: writing: true
log: GPIO: GreenLED: writing: true
log: GPIO: Relay: close:
log: GPIO: BlueLED: close:
log: GPIO: GreenLED: close:
log: GPIO: RedLED: close:
log: GPIO: Button: close:
log: GPIO: GPIO23: close:
log: board: flex-phat: Stopped
```

Change-Id: Idea8e081c9e1f4d880d937cd0537cf31215f48b5
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
@rzr rzr force-pushed the sandbox/rzr/review/master branch from 64ad82f to 9e5c610 Compare August 29, 2018 13:35
@mrstegeman mrstegeman merged commit 0092be5 into WebThingsIO:master Aug 29, 2018
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
Note that gpio_key could overlap, see later makefile

Change-Id: I0de4ace8a21a0592e5e09e692d43aa04ed7488e8
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
Usage:

    node example/platform flex-phat

Change-Id: I3612e28ae50d5bd14f5f4b06c5e0dbead7a84a92
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
To setup GPIOs, it will be used also for IoT.js

Usage:
```
make -C example/platform/ flex-phat

log: board: flex-phat: Loading
Usage:
/home/pi/.nvm/versions/node/v8.11.3/bin/node /tmp/pi/mnt/local/local/home/philippe/var/cache/url/git/ssh/github.com/tizenteam/webthing-node/src/webthing-node/example/platform/index [board] [port]
Try:
curl -H "Accept: application/json" http://localhost:8888

log: board: flex-phat: Started
log: GPIO: GreenLED: open:
log: GPIO: BlueLED: open:
log: GPIO: Relay: open:
log: GPIO: RedLED: open:
log: GPIO: Button: open:
log: GPIO: GPIO23: open:
log: GPIO: Button: change: false
log: GPIO: Button: change: true
log: GPIO: RedLED: writing: true
log: GPIO: GreenLED: writing: true
log: GPIO: Relay: close:
log: GPIO: BlueLED: close:
log: GPIO: GreenLED: close:
log: GPIO: RedLED: close:
log: GPIO: Button: close:
log: GPIO: GPIO23: close:
log: board: flex-phat: Stopped
```

Change-Id: Idea8e081c9e1f4d880d937cd0537cf31215f48b5
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
Usage:

    node example/platform flex-phat

Change-Id: I3612e28ae50d5bd14f5f4b06c5e0dbead7a84a92
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
Note that gpio_key could overlap, see later makefile

Change-Id: I0de4ace8a21a0592e5e09e692d43aa04ed7488e8
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
To setup GPIOs, it will be used also for IoT.js

Usage:
```
make -C example/platform/ flex-phat

log: board: flex-phat: Loading
Usage:
/home/pi/.nvm/versions/node/v8.11.3/bin/node /tmp/pi/mnt/local/local/home/philippe/var/cache/url/git/ssh/github.com/tizenteam/webthing-node/src/webthing-node/example/platform/index [board] [port]
Try:
curl -H "Accept: application/json" http://localhost:8888

log: board: flex-phat: Started
log: GPIO: GreenLED: open:
log: GPIO: BlueLED: open:
log: GPIO: Relay: open:
log: GPIO: RedLED: open:
log: GPIO: Button: open:
log: GPIO: GPIO23: open:
log: GPIO: Button: change: false
log: GPIO: Button: change: true
log: GPIO: RedLED: writing: true
log: GPIO: GreenLED: writing: true
log: GPIO: Relay: close:
log: GPIO: BlueLED: close:
log: GPIO: GreenLED: close:
log: GPIO: RedLED: close:
log: GPIO: Button: close:
log: GPIO: GPIO23: close:
log: board: flex-phat: Stopped
```

Change-Id: Idea8e081c9e1f4d880d937cd0537cf31215f48b5
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
Note that gpio_key could overlap, see later makefile

For more insights check:

https://github.com/rzr/webthing-iotjs/wiki/Sensor

Change-Id: I0de4ace8a21a0592e5e09e692d43aa04ed7488e8
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Thanks-to: @leon-anavi <leon@anavi.org>
Signed-off-by: Philippe Coval <p.coval@samsung.com>
mrstegeman pushed a commit that referenced this pull request Aug 29, 2018
Note that gpio_key could overlap, see later makefile

For more insights check:

https://github.com/rzr/webthing-iotjs/wiki/Sensor

Change-Id: I0de4ace8a21a0592e5e09e692d43aa04ed7488e8
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: #31
Thanks-to: @leon-anavi <leon@anavi.org>
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
Usage:

    node example/platform flex-phat

For more insights check:

https://github.com/rzr/webthing-iotjs/wiki/Sensor

Thanks-to: @leon-anavi <leon@anavi.org>
Change-Id: I3612e28ae50d5bd14f5f4b06c5e0dbead7a84a92
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
mrstegeman pushed a commit that referenced this pull request Aug 29, 2018
Usage:

    node example/platform flex-phat

For more insights check:

https://github.com/rzr/webthing-iotjs/wiki/Sensor

Thanks-to: @leon-anavi <leon@anavi.org>
Change-Id: I3612e28ae50d5bd14f5f4b06c5e0dbead7a84a92
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: #31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
To setup GPIOs, it will be used also for IoT.js

Usage:
```
make -C example/platform/ flex-phat

log: board: flex-phat: Loading
Usage:
/home/pi/.nvm/versions/node/v8.11.3/bin/node /tmp/pi/mnt/local/local/home/philippe/var/cache/url/git/ssh/github.com/tizenteam/webthing-node/src/webthing-node/example/platform/index [board] [port]
Try:
curl -H "Accept: application/json" http://localhost:8888

log: board: flex-phat: Started
log: GPIO: GreenLED: open:
log: GPIO: BlueLED: open:
log: GPIO: Relay: open:
log: GPIO: RedLED: open:
log: GPIO: Button: open:
log: GPIO: GPIO23: open:
log: GPIO: Button: change: false
log: GPIO: Button: change: true
log: GPIO: RedLED: writing: true
log: GPIO: GreenLED: writing: true
log: GPIO: Relay: close:
log: GPIO: BlueLED: close:
log: GPIO: GreenLED: close:
log: GPIO: RedLED: close:
log: GPIO: Button: close:
log: GPIO: GPIO23: close:
log: board: flex-phat: Stopped
```

Cc: @leon-anavi <leon@anavi.org>
Change-Id: Idea8e081c9e1f4d880d937cd0537cf31215f48b5
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 29, 2018
To setup GPIOs, it will be used also for IoT.js

Usage:
```
make -C example/platform/ flex-phat

log: board: flex-phat: Loading
Usage:
/home/pi/.nvm/versions/node/v8.11.3/bin/node /tmp/pi/mnt/local/local/home/philippe/var/cache/url/git/ssh/github.com/tizenteam/webthing-node/src/webthing-node/example/platform/index [board] [port]
Try:
curl -H "Accept: application/json" http://localhost:8888

log: board: flex-phat: Started
log: GPIO: GreenLED: open:
log: GPIO: BlueLED: open:
log: GPIO: Relay: open:
log: GPIO: RedLED: open:
log: GPIO: Button: open:
log: GPIO: GPIO23: open:
log: GPIO: Button: change: false
log: GPIO: Button: change: true
log: GPIO: RedLED: writing: true
log: GPIO: GreenLED: writing: true
log: GPIO: Relay: close:
log: GPIO: BlueLED: close:
log: GPIO: GreenLED: close:
log: GPIO: RedLED: close:
log: GPIO: Button: close:
log: GPIO: GPIO23: close:
log: board: flex-phat: Stopped
```

Cc: @leon-anavi <leon@anavi.org>
Change-Id: Idea8e081c9e1f4d880d937cd0537cf31215f48b5
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Aug 30, 2018
To setup GPIOs, it will be used also for IoT.js

```sh
project="webthing-iotjs"
url="https://github.com/rzr/${project}"
branch='sandbox/rzr/review/master'
git clone --recursive --depth 1 -b "$branch" "$url" ; cd "$project"
make -C example/platform play-phat
```

Expected log:

```
NODE_PATH=.:../.. node index play-phat
log: board: play-phat: Loading
Usage:
/home/pi/.nvm/versions/node/v8.11.4/bin/node /home/pi/webthing-iotjs/example/platform/index [board] [port]
Try:
curl -H "Accept: application/json" http://localhost:8888

log: board: play-phat: Started
log: GPIO: Left: open:
log: GPIO: Right: open:
log: GPIO: Up: open:
log: GPIO: Down: open:
log: GPIO: A: open:
log: GPIO: B: open:
log: GPIO: Start: open:
log: GPIO: Select: open:

log: GPIO: Start: change: false
log: GPIO: Start: change: true

```

[![PlayPHat](https://camo.githubusercontent.com/19757d01e0c0a4cd0f34d18826b1018b43dbf787/68747470733a2f2f7062732e7477696d672e636f6d2f6d656469612f446c31585a7564583441415330376b2e6a7067#playphat.png)](https://twitter.com/AnaviTechnology/status/1034311626793668608# "PlayPHat")

Cc: @leon-anavi <leon@anavi.org>
Change-Id: Idea8e081c9e1f4d880d937cd0537cf31215f48b5
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: WebThingsIO#31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
mrstegeman pushed a commit that referenced this pull request Aug 30, 2018
To setup GPIOs, it will be used also for IoT.js

```sh
project="webthing-iotjs"
url="https://github.com/rzr/${project}"
branch='sandbox/rzr/review/master'
git clone --recursive --depth 1 -b "$branch" "$url" ; cd "$project"
make -C example/platform play-phat
```

Expected log:

```
NODE_PATH=.:../.. node index play-phat
log: board: play-phat: Loading
Usage:
/home/pi/.nvm/versions/node/v8.11.4/bin/node /home/pi/webthing-iotjs/example/platform/index [board] [port]
Try:
curl -H "Accept: application/json" http://localhost:8888

log: board: play-phat: Started
log: GPIO: Left: open:
log: GPIO: Right: open:
log: GPIO: Up: open:
log: GPIO: Down: open:
log: GPIO: A: open:
log: GPIO: B: open:
log: GPIO: Start: open:
log: GPIO: Select: open:

log: GPIO: Start: change: false
log: GPIO: Start: change: true

```

[![PlayPHat](https://camo.githubusercontent.com/19757d01e0c0a4cd0f34d18826b1018b43dbf787/68747470733a2f2f7062732e7477696d672e636f6d2f6d656469612f446c31585a7564583441415330376b2e6a7067#playphat.png)](https://twitter.com/AnaviTechnology/status/1034311626793668608# "PlayPHat")

Cc: @leon-anavi <leon@anavi.org>
Change-Id: Idea8e081c9e1f4d880d937cd0537cf31215f48b5
Origin: https://github.com/rzr/webthing-iotjs
Forwarded: #31
Signed-off-by: Philippe Coval <p.coval@samsung.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants