Giter VIP home page Giter VIP logo

2smpb02e-grove-wiolte's Introduction

2smpb02e-grove-wiolte

オムロン製センサ 2SMPB-02E を MicroPythonで評価するためのモジュールとサンプルプログラム。

動作確認

  • MicroPython on Wio LTE

使い方

  • MicroPythonが動いているボードに grove_2smpb_02e.py をコピーします。
  • import grove_2smpb_02eとしてモジュールをインポートします。
  • 2SMPB-02Eを接続したGroveのI2Cに対応する machine.I2C のインスタンスを作成します。
    • Wio-LTEの場合は machine.I2C(1)
  • bus引数にI2Cのインスタンスを指定して Grove2smpd02eのインスタンスを作成します。
  • Grove2smpd02e.readData()を呼び出すとセンサのデータが返ってきます。
    • (temperature, humidity)のtupleが返ってきます。
import grove_2smpb_02e
import machine

i2c = machine.I2C(1)
addr = i2c.scan()
sensor = grove_2smpb_02e.Grove2smpd02e(bus=i2c, address=addr[0])
print(sensor.readData())

ライセンス

  • 元はOMRONのRaspberry Pi用Pythonモジュール(MITライセンス)なので、変更後のコードもMITライセンスに従います。

元のコードのライセンス表記

Copyright (c) OMRON Corporation. All rights reserved.

このリポジトリはMITライセンスの下でライセンスされています。

2smpb02e-grove-wiolte's People

Contributors

omron-devhub avatar ciniml avatar

Watchers

James Cloos avatar katutosi endou avatar

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.