raspberrypi-python-client
A library that provide access to the ATT IOT platform, for the Python language (geared for RPI development).
Installation
- Copy the library to the RPI:
- Run
git clone https://github.com/allthingstalk/raspberrypi-python-client
- or use an ftp client to copy the library to your RPI.
- Run
- Run
sudo bash raspberrypi-python-client/setupGrovePi.sh
in case you have the grovePi shield
orsudo bash raspberrypi-python-client/setupNoShield.sh
if you don't have a grovePi shield
pip
A pip version is also available, but it will only install the library, not the grovePi dependencies. To install with pip:
sudo pip install att_iot_client
When installing with pip, imports have to be declared like so:
import att_iot_client.ATT_IOT as IOT
Instructions
- Setup the raspberry pi hardware
- Grove kit shield
- Push button to A2
- Led light to D4
- Create the device in the IOT platform.
- Modify the template script 'Shield_Demo.py' :
sudo nano raspberrypi-python-client/Shield_Demo.py
fill in the missing strings: replace deviceId, clientId, clientKey. Optionally change/add the sensor & actuator names, pins, descriptions, types. - Run the script:
sudo python raspberrypi-python-client/Shield_Demo.py
Extra info
- This guide contains a full recipe and detailed explenation on all aspects of the process. It guides you into setting up your Grove Pi, SD card and the platform.
- There's a trouble shooting section you can check out if you are having problems.
- Also make certain that you check out all the availabile documentation that we have for the raspberry pi.
- Check out dexter industries (makers of the GrovePi) excellent tutorial for the RPI B+ on how to install the hardware.