Raspberry PI Dev Kit

Introduction

With this guide you can setup all the needed elements to use a Raspberry PI together with the Arrayent Connect Cloud and the sample DevKit mobile application.

What do you need?

Setup the Raspberry PI

Internet connection

Your PI should have an internet connection, preferrably through wi-fi but LAN will work as well. You need to make sure your can ping www.google.com or equivalent.

1) Install the DevKit files

Unzip the archive provided by Arrayent into a home folder.

2) Enter your device code in the “bin/device_code.py”

A device code is a set of values that uniquely identify a device connected to the Arrayent Cloud. It also identifies the Arrayent cloud URL that the device will communicate with.

Modify the following lines in the file bin/device_code.py

"-i", "1234",                             # Product ID
"-a", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", # Product AES Key
"-n", "ARR00001234",                      # Device Name
"-p", "7f",                               # Device Password
"-k", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", # Device AES Key
"-l", "my-dev-cloud.arrayent.com"         # Cloud URL

This information identifies the device and provides credentials for connection to the Arrayent Cloud.

3) Start the Dev Kit application

cd bin
./DevKit.py

At this time you will see on the screen various logging information describing what is happening.

Send and receive attributes

You can exchange attributes between the cloud and the device by making use of the Arrayent Utility application.

More details

This sample app is made of a C language wrapper for the Arrayent Connect Agent (ACA) and a Python sample application to enable simple edits and modifications of its behavior for demonstration purposed of for building proof-of-concepts.

The C language wrapper can be re-complied by running:

cd src
make

The minimal Arrayent library needed, called “Arrayent Connect Agent” is located here:

src/libaca.a
src/libaca.h
src/history.h

The Python application can be used to easily modify the behavior of this sample application and interact with external peripherals or react to commands from the Cloud.

Look at the function ProcessKVP in the bin/DevKit.py file to see the current behavior of the application