-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmy_custom.h
More file actions
28 lines (23 loc) · 875 Bytes
/
my_custom.h
File metadata and controls
28 lines (23 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef HASP_CUSTOM_H
#define HASP_CUSTOM_H
#if defined(HASP_USE_CUSTOM)
#include <ArduinoJson.h>
#include <PacketSerial.h>
// Define the packet types matching those in the RP2040 code
#define PKT_TYPE_SCD41_TEMPERATURE 0xB0
#define PKT_TYPE_SCD41_HUMIDITY 0xB1
#define PKT_TYPE_SCD41_CO2 0xB2
#define PKT_TYPE_AHT20_TEMPERATURE 0xB3
#define PKT_TYPE_AHT20_HUMIDITY 0xB4
#define PKT_TYPE_SGP40_TVOC 0xB5
void custom_setup();
void custom_loop();
void custom_every_second();
void custom_every_5seconds();
bool custom_pin_in_use(uint8_t pin);
// --- NOWE HAKI ---
void custom_state_subtopic(const char* subtopic, const char* payload);
void custom_topic_payload(const char* topic, const char* payload, uint8_t source);
void custom_get_sensors(JsonDocument& doc);
#endif // HASP_USE_CUSTOM
#endif // HASP_CUSTOM_H