如何设置和运行 Pico W 蓝牙示例

问题描述 投票:0回答:0

我是 C/C++ 世界的新手,但我正在尝试在 pico-sdk 中运行 spp_counter.c 示例。当我运行 make 时出现此错误

fatal error: btstack.h: No such file or directory
58 | #include "btstack.h"

我使用的代码直接来自此处的存储库 https://github.com/bluekitchen/btstack/tree/0d212321a995ed2f9a80988f73ede854c7ad23b8/example。这是我的 CMakeLists.txt

cmake_minimum_required(VERSION 3.13)

# initialize the SDK based on PICO_SDK_PATH
# Include build functions from Pico SDK
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)

project(my_project)

# initialize the Raspberry Pi Pico SDK
set(PICO_BOARD pico_w)

pico_sdk_init()

# rest of your project
add_executable(test
    test.c
)

# Add pico_stdlib library which aggregates commonly used features
target_link_libraries(test pico_stdlib)

# create map/bin/hex/uf2 file in addition to ELF.
pico_add_extra_outputs(test)

我不确定我错过了什么。

raspberry-pi bluetooth microcontroller
© www.soinside.com 2019 - 2024. All rights reserved.