Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
refactor: use v2 CSDK, v2.2 libmraa
Browse files Browse the repository at this point in the history
Signed-off-by: Iain Anderson <iain@iotechsys.com>
  • Loading branch information
iain-anderson committed Aug 3, 2022
1 parent 7e0b187 commit 5cbca82
Show file tree
Hide file tree
Showing 15 changed files with 299 additions and 539 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
prime/
squashfs-root/
VERSION
build/
deps/
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Changes for release v2.2.0
- Device service updated to use C SDK (v2.2.0)
- Update to mraa library version 2.2.0

Changes for release v1.3.1
- Device service updated to use C SDK (v1.3.1)

Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The EdgeX Device Grove Service is developed to control/communicate Grove sensors connected on Grove PI in an EdgeX deployment

## Supported Boards:
Raspberry PI 3+ - ARM64 bit
Raspberry PI 3, 4 - ARM64 bit

## Dependencies:

Expand All @@ -21,15 +21,26 @@ The repository can be found on git at [libmraa](https://github.com/intel-iot-dev
2. Build a docker image by using the following command
```
sh> cd device-grove-c
sh> make version
sh> docker build . -t device-grove-c -f ./scripts/Dockerfile.alpine
sh> make docker
```
This command shall build the dependencies - libmraa and device-c-sdk library and create the release version of the docker image by the name 'device-grove-c'. This name can be replaced with your preferred name, if necessary.
This command shall build the dependencies - libmraa and device-c-sdk library and create the release version of the docker image by the name 'device-grove-c'.
By default, the configuration and profile file used by the service are available in __'res'__ folder.

## Configuration for docker image
1. Port number specified in the configuration.toml
2. --device=/dev/ < i2c-device > to map host device to the container. For Raspberry PI, it is i2c-1.

**Note:** On Raspberry PI, make sure that i2c_arm=on is set. This enables i2c-1 device, required for communication between Grove PI & Raspberry PI boards.

### Building natively

Before building natively the dependencies for the C SDK need to be installed: these are listed at https://github.com/edgexfoundry/device-sdk-c

The `build_deps.sh` script downloads and builds the required libmraa and the EdgeX device SDK. The `build.sh` script is then used to build the device service.

```
sh> cd device-grove-c
sh> ./scripts/build_deps.sh
sh> ./scripts/build.sh
```
338 changes: 0 additions & 338 deletions res/Grove_Device.yaml

This file was deleted.

Loading

0 comments on commit 5cbca82

Please sign in to comment.