louischaman / Resin_HelloOSIO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hello-python

This is a barebones resin.io project to demonstrate running python code. Currently it is targeting a raspberry pi and builds upon a debian wheezy base image. However, it is easy to change this to target any of the other targeted platforms supported by resin.io, all that you need to do is change the line:

FROM resin/rpi-raspbian:wheezy-2015-01-15

to any of the base OS images from the resin.io docker hub.

For an explination on how resin.io uses Dockerfiles check out the Dockerfile guide . Additionally if you want to learn how to optimise your Dockerfile look over here

Note: Obviously apt package manager will only work in Debian environments.

Additions for OpenSensors

Added 2 lines to the docker file to install python-pip and paho-mqtt client library for python.

Created a loop in the python script that connects and publishes to OSIO

About


Languages

Language:Python 100.0%