Feat: Změny
This commit is contained in:
Vendored
BIN
Binary file not shown.
@@ -16,4 +16,3 @@ monitor_speed = 115200
|
||||
lib_deps =
|
||||
WiFi
|
||||
ArduinoJson
|
||||
WebSocketsClient
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
const int scanIterations = 5;
|
||||
const int maxChannel = 14; // Maximum number of Wi-Fi channels in the 2.4 GHz band
|
||||
const int maxChannel = 14;
|
||||
int channelUsage[maxChannel] = {0};
|
||||
|
||||
void setup() {
|
||||
@@ -31,14 +31,14 @@ void loop() {
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
// Create a JSON object to store channel usage data
|
||||
|
||||
StaticJsonDocument<256> jsonDocument;
|
||||
JsonObject channelUsageJson = jsonDocument.to<JsonObject>();
|
||||
|
||||
for (int channelIndex = 0; channelIndex < maxChannel; channelIndex++) {
|
||||
String channel = String(channelIndex + 1);
|
||||
channelUsageJson[channel] = channelUsage[channelIndex];
|
||||
channelUsage[channelIndex] = 0; // Reset channel usage counter for the next analysis
|
||||
channelUsage[channelIndex] = 0;
|
||||
}
|
||||
|
||||
// Serialize and print the JSON object
|
||||
|
||||
Reference in New Issue
Block a user