This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
products:sbc:common:applications:gsensor [2026/02/03 22:53] gray update by using AI |
products:sbc:common:applications:gsensor [2026/02/23 21:16] (current) gray old revision restored (2025/02/18 01:40) |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| - | This guide explains how to identify the G-Sensor | + | By referring |
| ===== System Configuration ===== | ===== System Configuration ===== | ||
| - | Verify the G-Sensor device | + | Check G-sensor |
| ```shell | ```shell | ||
| $ ll / | $ ll / | ||
| - | ``` | ||
| - | Expected output: | ||
| - | ```shell | ||
| crw-rw-rw- 1 root root 10, 50 Mar 18 12:17 /dev/accel | crw-rw-rw- 1 root root 10, 50 Mar 18 12:17 /dev/accel | ||
| ``` | ``` | ||
| Line 19: | Line 16: | ||
| ===== Demo Source Code ===== | ===== Demo Source Code ===== | ||
| - | The following sample program demonstrates reading data from the G-Sensor using default settings. You can extend it to implement | + | The source code only realizes |
| ```c gsensor_sample_data.c | ```c gsensor_sample_data.c | ||
| Line 86: | Line 83: | ||
| ``` | ``` | ||
| - | Compile the program: | + | Compile the source code obtained. |
| ```shell | ```shell | ||
| Line 94: | Line 91: | ||
| ===== Demonstrate ===== | ===== Demonstrate ===== | ||
| - | Run the compiled program. While it is running, | + | Rotate |
| ```shell | ```shell | ||