Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
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,881
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
53 projects • 231 followers
Maker @ ubidots.com
Contact

Comments

Please log in or sign up to comment.