#ifndef MAIN_H #define MAIN_H #include #include "pico/stdlib.h" #include "hardware/gpio.h" #include "Lib/pico-onewire/api/one_wire.h" #include "Lib/radio-switch.h" #include "hardware/clocks.h" #include "hardware/watchdog.h" #include "pico/multicore.h" #include "hardware/i2c.h" #include "pico/binary_info.h" #include "hardware/uart.h" #include "hardware/pwm.h" #include "hardware/adc.h" #include "pico/cyw43_arch.h" #include "lwip/pbuf.h" #include "lwip/tcp.h" #include "lwip/ip_addr.h" // 包含 IP 地址结构体定义 #include "hardware/vreg.h" #include "hardware/clocks.h" #define BUFER 1024 #define DS18B20_PIN 15 // DS18B20 引脚 #define CH4_PIN 14 // CH4 引脚 #define _433_MHZ_PIN 13 #define SIGN_CH4 1 #define SIGN_DS18B20 2 #define SIGN_CO 3 #define SIGN_CO2 4 #define SIGN_RP2040 5 #define WIFI_SSID "your_wifi_ssid" #define WIFI_PASSWORD "your_wifi_password" #define UART1 uart1 #define BAUD_RATE 9600 #define DATA_BITS 8 #define STOP_BITS 1 #define PARITY UART_PARITY_NONE #define UART1_TX_PIN 5 // MH-Z14B T #define UART1_RX_PIN 4 // MH-Z14B R #define UART0 uart0 #define UART0_TX_PIN 1 // #define UART0_RX_PIN 0 // #endif