Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mainshayne233/elixir_pins
https://github.com/mainshayne233/elixir_pins
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mainshayne233/elixir_pins
- Owner: MainShayne233
- Created: 2016-10-16T05:41:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-17T05:02:56.000Z (about 8 years ago)
- Last Synced: 2024-10-29T08:40:05.115Z (21 days ago)
- Language: Elixir
- Size: 15.6 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ElixirPins
Elixir API for Raspberry PI GPIO pins## Install
Add
```elixir
{:elixir_pins, "0.0.1"}
```
to your dependency list in your mix.exs file.Example:
```elixir
defp deps do
[
{:elixir_pins, "0.0.1"}
]
end
```## Running locally on Pi
```elixir
ElixirPins.turn_on 4 #-> turns on GPIO4 (pin #7)
ElixirPins.turn_off 4 #-> turns off GPIO4 (pin #7)
```## Running on remote computer
``` elixir
client = [
ip: '192.168.1.123', # ip address of raspberry pi
user: 'pi', # username of user on raspberry pi
password: 'securepassword' # password for specified user
]
ElixirPins.turn_on 4, client #-> turns on GPIO4 (pin #7) on remote raspberry pi
ElixirPins.turn_off 4, client #-> turns off GPIO4 (pin #7) on remote raspberry pi
```