From 0539014bfda3bc7b60d4ddcc18ec68c912357963 Mon Sep 17 00:00:00 2001 From: chenanchun Date: Fri, 30 Jan 2026 20:02:48 +0800 Subject: [PATCH] feat: complete v0.0.1 temperature and id reporting --- prj.conf | 4 +++- src/main.cpp | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/prj.conf b/prj.conf index 2ad4d3d..af710e3 100644 --- a/prj.conf +++ b/prj.conf @@ -8,4 +8,6 @@ CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_PMC_COM=y -CONFIG_HWINFO=y \ No newline at end of file +CONFIG_HWINFO=y + +CONFIG_REBOOT=y \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index a8b1e97..7d54a3f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,6 +7,7 @@ using namespace pmc; auto sensor = DEVICE_DT_GET(DT_NODELABEL(godtek)); +auto uart = DEVICE_DT_GET(DT_NODELABEL(usart2)); volatile bool flag{false}; @@ -22,6 +23,11 @@ auto main(void) -> int { }; while (1) { + for (int i = 0; i < 16; i++) { + uart_poll_out(uart, 0xAA); + } + k_msleep(100); + if (flag) { sensor_value val{0, 0}; if (sensor_sample_fetch_chan(sensor, SENSOR_CHAN_AMBIENT_TEMP) == 0) {