GithubHelp home page GithubHelp logo

shuntingyard / iio_am2315_userspace_snippets Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 16 KB

Linux Industrial I/O Subsystem - user space example config

Makefile 1.80% C 45.17% Shell 53.03%
iio i2c linux iio-devices industrial-linux

iio_am2315_userspace_snippets's Introduction

IIO_am2315_userspace_snippets

Build Status

What is this about?

One of the modules in the Linux Industrial I/O Subsystem (IIO) is called am2315. It is used to drive I2C sensors for relative humidity and temperature - more specifically the devices known as AM2315 and Aosong AM2321.

While the I2C kernel space code for these devices is not too complicated to write and understand, setting up a working user space configuration for am2315 and the IIO subsystem until now has not been documented in one place and looks a bit tricky at first glance.

The content of this repo provides simple examples, demonstrating how to go about the setup task and how to read data conveyed by the am2315 module and IIO subsystem.

Content

Scripts

There are one or two shell scripts with basic comments (see the scripts directory) as examples how to set up/ tear down a working IIO configuration for am2315 and corresponding I2C devices.

Utilities

The repo contains a very simple utility (catiio) for reading output (relative humidity, temperature and a timestamp) from the character device created by working setups for the AM2315 and AM2321 sensors.

Technical notes

The I2C address used for AM2315 and AM2321 devices is always 0x5c. Therefore there can never exist more than one of these devices per I2C adapter or bus.

catiio is essentially about decoding data types in channels

le:s16/16>>0 for in_humidityrelative_type

le:s16/16>>0 for in_temp_type

le:s64/64>>0 for in_timestamp_type

on the character device providing values from sensors.

iio_am2315_userspace_snippets's People

Contributors

shuntingyard avatar

Watchers

 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.