Questions tagged [iio]

Industrial I/O is a Linux kernel framework that provides uniform access to sensors and other ADC/DAC-based devices.

The main purpose of the Industrial I/O subsystem (IIO) is to provide support for devices that in some sense perform either analog-to-digital conversion (ADC) or digital-to-analog conversion (DAC) or both. The aim is to fill the gap between the somewhat similar hwmon and input subsystems. Hwmon is directed at low sample rate sensors used to monitor and control the system itself, like fan speed control or temperature measurement. Input is, as its name suggests, focused on human interaction input devices (keyboard, mouse, touchscreen). In some cases there is considerable overlap between these and IIO.

Devices that fall into this category include:

  • analog to digital converters (ADCs)
  • accelerometers
  • capacitance to digital converters (CDCs)
  • digital to analog converters (DACs)
  • gyroscopes
  • inertial measurement units (IMUs)
  • color and light sensors
  • magnetometers
  • pressure sensors
  • proximity sensors
  • temperature sensors

Usually these sensors are connected via SPI or I2C. A common use case of the sensors devices is to have combined functionality (e.g. light plus proximity sensor).

Links:

  1. https://wiki.analog.com/software/linux/docs/iio/iio

  2. https://www.kernel.org/doc/htmldocs/iio/

73 questions
0
votes
2 answers

Why is my Go app not reading from sysfs like the busybox `cat` command?

Go 1.12 on Linux 4.19.93 armv6l. Hardware is a raspberypi zero w (BCM2835) running a yocto linux image. I've got a gpio driven SRF04 proximity sensor driven by the srf04 linux driver. It works great over sysfs and the busybox shell. # cat…
bvarner
  • 363
  • 3
  • 9
0
votes
0 answers

Why is an included C-header not found when cross-compiling but well when not cc?

I'm trying to crossl-compile the IIO tools from the Linux kernel repository for a Raspberry Pi on a x64 Lubuntu machine, compiling the whole Raspbian kernel worked fine though. First I tested it on the x64 machine: ~/linux/tools$ make iio Which…
0
votes
1 answer

How to add write_raw function in my iio_info structure

I am writing a driver using iio framework. So far it goes well. All the inputs and sysfs entries are working perfectly and the values measured are fine. (It is very well documented and it is easy). But I need a small extension to be able to write on…
Georgi
  • 53
  • 2
  • 7
0
votes
2 answers

using the iio python package

Hello there fellow Devs :) I want to listen for the information given by the MMA8452 acceleration sensor with python. To do this i want to use the libiio package for python. To install it I manually built it following the instructions given in this…
0
votes
0 answers

How to compile AD9834 kernel driver

I have an AD9834 (it's a Direct Digital Synthesis chip) evaluation board that I'd like to connect to my Raspberry PI. It uses an SPI interface. While I could just drive the SPI interface directly from Python, etc. I'd prefer to use the Linux kernel…
watkipet
  • 959
  • 12
  • 23
0
votes
1 answer

Android IIO sensors

How can I catch iio_events generated by iio sensors in app level and in native level( from adb shell for example or via an existing deamon) on Android Nougat ? (for instance in_intensity_falling_threshold event of an ambient light sensor) I tried…
Kaplan
  • 11
  • 6
0
votes
1 answer

reading from sensors based on softlinks

How do I read from these sensors? I just found their location, but the folder appears to contain softlinks to another location. My goal is to monitor the gyroscope. $ ls /sys/bus/iio/devices/iio:device* lrwxrwxrwx 1 root root 0 Jan 31 23:18…
Rilcon42
  • 9,584
  • 18
  • 83
  • 167
0
votes
0 answers

error when I implement Android HAL for Invensense MPU-9250

I am writing HAL ( Hardware Abstraction Layer) for MPU-9250 I copied a Packages from here to under drivers/staging/iio/imu in my android kernel and then from here to under android/device/ti/blaze/libsensors in my android sources here is logcat…
Yeol_
  • 93
  • 1
  • 1
  • 9
0
votes
0 answers

Increment Linux IIO producer's module refcnt when "in use"

I've made a driver that is an Industrial I/O (IIO) "producer" (it provides ADC readings). I've compiled it as a module. I've got another driver that is an IIO "consumer" that uses an ADC input from the first driver (it calls iio_channel_get() in its…
Craig McQueen
  • 41,871
  • 30
  • 130
  • 181
0
votes
1 answer

Read ADC (Beaglebone Black) without closing File Descriptor

Is it possible to read the ADC of a Beaglebone Black or another embedded-linux system without closing the File descriptor? I tried it with a select before read(). select() returns 1, but read() returns 0 after the first iteration and therefore I…
ben
  • 207
  • 1
  • 10
0
votes
2 answers

Apportable & CoreMotion

I'm trying to get my game working on Android. I've ported it with the free version of Apportable and it works quite well, but I haven't been able to implement the gyroscope feature. CMMotionManager gets initialized but the motion updates never start…
user957426
-1
votes
1 answer

Read a word (2 byte) without providing a register address from userspace

I am trying to read out an i2c ambient light sensor BH1750 from C in userspace. I am using a BeagleBone pocket with Linux. The Datasheet says, that after a measurement operation the result needs to be read with the following i2c sequence: S Adr Rd…
Anderle
  • 43
  • 5
-3
votes
1 answer

Linux & C: System() Command

I am currently working on a project that requires me to call a Linux command during a C code. I have found on other sources that I can do this using the system() command and then save the value for the Linux shell to my C program. For example, I…
Dwhite
  • 1
  • 3
1 2 3 4
5