UbiMaker
Published

Logging sensor data using Intel Edison and Python

Grab sensor data from your Intel Edison without the need of the Arduino IDE, using the Mraa Python library

BeginnerFull instructions provided9,867
Logging sensor data using Intel Edison and Python

Things used in this project

Story

Read more

Code

intel-analog.py

Python
#!/usr/bin/python

import time, mraa
from ubidots import ApiClient

#Connect to Ubidots

for i in range(0,5):
    try:
        print "Requesting Ubidots token"
        api = ApiClient('abebasfaf4e14d195c0044fcasdfdf9dsfab9d653af3')
        break
        # Replace with your Ubidots API Key here
    except:
        print "No internet connection, retrying..."
        time.sleep(5)

a0 = mraa.Aio(0)
a1 = mraa.Aio(1)

while(1):
    api.save_collection([{'variable': '558073727625425555af27e4','value':a0.read()}, {'variable': '5580737876254257514be1e6','value':a1.read()}])

Credits

UbiMaker

UbiMaker

53 projects • 228 followers
Maker @ ubidots.com

Comments