Skip to content

Commit

Permalink
陀螺仪
Browse files Browse the repository at this point in the history
陀螺仪jy901
  • Loading branch information
chickencheng authored Dec 20, 2023
1 parent 2edf6ff commit 3a08e14
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/jy901/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
idf_component_register(SRCS "jy901.c"
INCLUDE_DIRS ".")
22 changes: 22 additions & 0 deletions components/jy901/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## example
```c
// 主函数
void app_main()
{
printf("1");
// 初始化UART
jy901_init();
printf("2");
// 循环执行
while (1)
{
printf("1");
// 读取JY901的数据
jy901_read();
// 打印JY901的数据
jy901_print();
// 延时100毫秒
vTaskDelay(100 / portTICK_PERIOD_MS);
}
}
```

0 comments on commit 3a08e14

Please sign in to comment.