Git Product home page Git Product logo

intelup2grove's Introduction

IntelUp2Grove


A repo to store example Python scripts for the Intel UP^2 IoT Dev board with the GrovePi+ shield.

I was not able to find any documentation on using the UP^2 Grove IoT Dev Kit https://www.seeedstudio.com/UP-Grove-IoT-Development-Kit-p-2994.html and Python. Below are sample scripts for (most, soon to be all) sensors in the kit. Thanks for looking and let me know if you need any help

alt_tag

Notes


  • Install python3-mraa
  • Install python3-upm
  • Using the GrovePi+ all the pins start counting from 512, i.e. A0=512 D8=520.
  • The GrovePi is a subplatform, you will have to initiate it with mraa.addSubplatform(mraa.GROVEPI, "0")

Examples


  • led.py : Blinking an LED with python on D8 and the GrovePi+ wuth UP^2

  • temp.py : Read the Grove Temp & Humidity Sensor Mini (TH02) with GrovePi+ wuth UP^2

  • light.py : Read the value of the Grove Light Sensor v1.2 with the UP^2

  • lcd.py : Display data and change color on GrovePi+ UP^2 with python

  • button.py : Read the Grove-Button on GrovePi+ UP^2 with python

  • groveup.py : A python module for the GrovePi+ and Intel UP^2 .

  • modExample.py : Example for using the module

#Module Info

First thing import groveup .

from groveup import * 

Example script usage:

#Print to the LCD 
joe@squared:~$ sudo ./modExample.py --lcd --lcdOne=Hello --lcdTwo=World --lcdColor=green 
  
#Read the temperature sensor
joe@squared:~$ sudo ./modExample.py --temp
Temperature: 67°F Humidity: 49%

Useful Links


Troubleshooting


If you see the message below, it means you should run the script with sudo.

File "./led.py", line 29, in <module>
    pin=mraa.Gpio(520)
  File "/usr/lib/python3.5/dist-packages/mraa.py", line 836, in __init__
    this = _mraa.new_Gpio(pin, owner, raw)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.