Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lesson 11. MPU6050 with IRQ and filter #119

Open
wants to merge 1 commit into
base: Alexander.Androsov
Choose a base branch
from

Conversation

megaparanoik
Copy link

Added a sysfs module code based on sysfs module from MPU6050 lesson.
To build the module you should first export the BUILD_KERNEL environment variable, that points to a kernel directory.

The module implements detection, initialization, and handling of MPU6050 chip.
The module creates an interface at /sys/class/mpu6050.
A set of properties allow getting access to:

  • raw accelerometer data,
    /sys/class/mpu6050/accel_x
    /sys/class/mpu6050/accel_y
    /sys/class/mpu6050/accel_z

  • raw gyroscope data,
    /sys/class/mpu6050/gyro_x
    /sys/class/mpu6050/gyro_y
    /sys/class/mpu6050/gyro_z

  • smoothed accelerometer data,
    /sys/class/mpu6050/sma_x
    /sys/class/mpu6050/sma_y
    /sys/class/mpu6050/sma_z

  • raw temperature data.
    /sys/class/mpu6050/temp

Also, the module provides some statistic such as a number of handled irq since the module started and speed of irq handling.
/sys/class/mpu6050/irq_speed
/sys/class/mpu6050/irq_handled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants