Internet of Things - Xively

Sign Up - Xively (free)

Install software:

opkg update
opkg install python-openssl 
opkg install distribute 
easy_install xively-python
easy_install requests
nano /mnt/sda1/
import os
import xively
import subprocess
import time
import datetime
import requests
import sys
# initialize api client
api = xively.XivelyAPIClient(API_KEY)
def read_temperature():
   temperature = sys.argv[1]
   return temperature
# function to return a datastream object. This either creates a new datastream,
# or returns an existing one
def get_datastream(feed):
    datastream = feed.datastreams.get("TemperatureSensor")
    return datastream
    datastream = feed.datastreams.create("TemperatureSensor", tags="temperature")
    return datastream
# main program entry point - runs continuously updating our datastream with the
# latest temperature reading
def run():
  feed = api.feeds.get(FEED_ID)
  datastream = get_datastream(feed)
  datastream.max_value = None
  datastream.min_value = None
  degreesCelcius = read_temperature()
  datastream.current_value = degreesCelcius = datetime.datetime.utcnow()
  except requests.HTTPError as e:
      print "HTTPError({0}): {1}".format(e.errno, e.strerror)
chmod 755 /mnt/sda1/


/mnt/sda1/ 80

ATmega32u4 code:

#include <Process.h>
void setup() {
  Bridge.begin(); // Initialize Bridge
void loop() {
  Process p;  // Create a process and call it "p"
  p.begin("/mnt/sda1/"); // Process that launch the "" command
  p.addParameter("90"); // Add the parameter to "Temp";      // Run the process and wait for its termination