查看ESP32 Onchip Sensor的源代码
←
ESP32 Onchip Sensor
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== Code == <source lang=cpp> /* * MaiKe Labs (2016 - 2026) * * Written by Jack Tan <jiankemeng@gmail.com> * * This example code is in the Public Domain (or CC0 licensed, at your option.) * Unless required by applicable law or agreed to in writing, this * software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. * */ #include <stdio.h> #include <stdlib.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_system.h" #include "nvs_flash.h" uint8_t temprature_sens_read(); uint32_t hall_sens_read(); void read_sens_task(void *pvParameters) { while (1) { printf("ESP32 onchip Temperature = %d\n", temprature_sens_read()); printf("ESP32 onchip Hall sensor = %d\n", hall_sens_read()); vTaskDelay(4000 / portTICK_PERIOD_MS); } } void app_main() { nvs_flash_init(); system_init(); printf("Welcome to Noduino Quantum\r\n"); printf("Try to read the sensors inside the ESP32 chip ... \r\n"); xTaskCreatePinnedToCore(&read_sens_task, "read_sens_task", 2048, NULL, 5, NULL, 0); } </source> <br><br>
返回到
ESP32 Onchip Sensor
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面