Added the webserver and the wifi handling
This commit is contained in:
46
CMakeLists.txt.save
Normal file
46
CMakeLists.txt.save
Normal file
@@ -0,0 +1,46 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
set(PICO_BOARD pico_w)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(PICO_SDK_PATH ${CMAKE_SOURCE_DIR}/pico-sdk)
|
||||
|
||||
# Pico SDK einbinden – MUSS vor project() stehen
|
||||
include(${PICO_SDK_PATH}/external/pico_sdk_import.cmake)
|
||||
|
||||
|
||||
project(sensor-pico C CXX ASM)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
pico_sdk_init()
|
||||
|
||||
add_subdirectory(lib/bme280 bme280_build)
|
||||
add_subdirectory(lib/dhcp_server dhcp_server_build)
|
||||
|
||||
add_executable(sensor-pico
|
||||
src/main.cpp
|
||||
src/webserver.c
|
||||
)
|
||||
|
||||
|
||||
|
||||
# Standard Ein-/Ausgabe über USB (du siehst printf im Terminal)
|
||||
pico_enable_stdio_usb(sensor-pico 1)
|
||||
pico_enable_stdio_uart(sensor-pico 0)
|
||||
|
||||
target_include_directories(sensor-pico PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
# Benötigte Bibliotheken
|
||||
target_link_libraries(sensor-pico
|
||||
pico_stdlib
|
||||
pico_cyw43_arch_lwip_threadsafe_background
|
||||
bme280
|
||||
dhcp_server
|
||||
pico_lwip
|
||||
pico_lwip_http
|
||||
)
|
||||
|
||||
# Erzeugt .uf2 Datei zum Flashen
|
||||
pico_add_extra_outputs(sensor-pico)
|
||||
Reference in New Issue
Block a user