Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adkron/grovepi
Use the GrovePi in Elixir
https://github.com/adkron/grovepi
elixir grovepi nerves
Last synced: 2 months ago
JSON representation
Use the GrovePi in Elixir
- Host: GitHub
- URL: https://github.com/adkron/grovepi
- Owner: adkron
- License: apache-2.0
- Created: 2017-03-01T03:49:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-27T14:39:31.000Z (over 5 years ago)
- Last Synced: 2024-10-26T22:52:06.639Z (3 months ago)
- Topics: elixir, grovepi, nerves
- Language: Elixir
- Homepage:
- Size: 633 KB
- Stars: 47
- Watchers: 4
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# GrovePi
[![Build Status](https://travis-ci.org/adkron/grovepi.svg?branch=master)](https://travis-ci.org/adkron/grovepi)
Use the [GrovePi+][dexter] and sensors in Elixir on a Raspberry Pi. If you have
a Beaglebone Green or other port that has direct access to sensors (rather than
going through a GrovePi+), take a look at [nerves_grove][nerves_grove].## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `grovepi` to your list of dependencies in `mix.exs`:```elixir
def deps do
[{:grovepi, "~> 0.5.1"}]
end
```The `grovepi` library uses [Elixir Circuits - I2C][circuits_i2c] for I2C communication to the
GrovePi+. This only works on Raspberry Pi computers. If you're working on
another platform, a stub is available for debugging and testing. When building
`grovepi` standalone, be aware that `circuits_i2c` is only used for `MIX_ENV=prod`
builds. To use the stub in your own programs, add the following to your
configuration:```elixir
config :grovepi, :i2c, GrovePi.I2C
```## API Documentation
See the generated documentation at [hexdocs.pm/grovepi][docs].
# Contributions
We welcome contributions to tackle issues in GrovePi.
## Setup
First fork the repository and fetch your own copy
```bash
mix deps.get
mix test
```## Submitting a Pull Request
1. [Fork the repository.][fork]
2. [Create a topic branch.][branch]
3. Add tests for your unimplemented feature or bug fix.
4. Run `mix test`. If your tests pass, return to step 3.
5. Implement your feature or bug fix.
6. Run `mix test`. If your tests fail, return to step 5.
7. Commit, and push your changes.
8. [Submit a pull request.][pr]## Running Tests
All tests can be run with `mix test` or a single test file can be run
with `mix test path/to/file_test.exs`.If you would like tests to run in the background as you change files you
can run `mix test.watch`.[dexter]: https://www.dexterindustries.com/grovepi/
[nerves_grove]: https://github.com/bendiken/nerves_grove/
[circuits_i2c]: https://hex.pm/packages/circuits_i2c
[docs]: https://hexdocs.pm/grovepi
[fork]: https://help.github.com/fork-a-repo/
[branch]: https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/
[pr]: https://help.github.com/articles/creating-a-pull-request/