Skip to content

Commit

Permalink
Update BresserWeatherSensorTest.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs authored Jul 24, 2023
1 parent a18b14f commit 93fe73f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions examples/BresserWeatherSensorTest/BresserWeatherSensorTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,27 @@
#include "WeatherSensor.h"

uint8_t testData[][MSG_BUF_SIZE-1] = {
// Lightning Sensor
// #0: Lightning Sensor
{0x73, 0x69, 0xB5, 0x08, 0xAA, 0xA2, 0x90, 0xAA, 0xAA, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},

// 5-in-1 Weather Sensor
// #1: 5-in-1 Weather Sensor
{0xEA, 0xEC, 0x7F, 0xEB, 0x5F, 0xEE, 0xEF, 0xFA, 0xFE, 0x76, 0xBB, 0xFA, 0xFF, 0x15, 0x13, 0x80, 0x14, 0xA0, 0x11,
0x10, 0x05, 0x01, 0x89, 0x44, 0x05, 0x00},

// 6-in-1 Sensor - Wind, Battery, Temperature, Humidity, UV
// #2: 6-in-1 Sensor - Wind, Battery, Temperature, Humidity, UV
{0x54, 0x1B, 0x21, 0x10, 0x34, 0x27, 0x18, 0xFF, 0x88, 0xFF, 0x29, 0x28, 0x06, 0x42, 0x87, 0xFF, 0xF0, 0xC6, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},

// 6-in-1 Sensor - Wind, Rain
// #3: 6-in-1 Sensor - Wind, Rain
{0x2A, 0xAF, 0x21, 0x10, 0x34, 0x27, 0x18, 0xFF, 0xAA, 0xFF, 0x29, 0x28, 0xFF, 0xBB, 0x89, 0xFF, 0x01, 0x1F, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},

// 7-in-1 Weather Sensor
// #4: Soil Temperature/Moisture (6-in-1 protocol)
{0xA1, 0x30, 0x74, 0x50, 0x85, 0x86, 0x49, 0xBB, 0xBB, 0xBB, 0xBB, 0xB0, 0x20, 0x56, 0x08, 0xBB, 0xB0, 0x62, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},

// #5: 7-in-1 Weather Sensor
{0xC4, 0xD6, 0x3A, 0xC5, 0xBD, 0xFA, 0x18, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xFC, 0xAA, 0x98, 0xDA, 0x89, 0xA3, 0x2F,
0xEC, 0xAF, 0x9A, 0xAA, 0xAA, 0xAA, 0x00}
};
Expand Down Expand Up @@ -97,7 +101,7 @@ void loop()
// Timeout occurs after a small multiple of expected time-on-air.
DecodeStatus decode_status = weatherSensor.decodeMessage(&testData[idx][0], MSG_BUF_SIZE-1);

idx = (idx == 4) ? 0 : idx+1;
idx = (idx == 5) ? 0 : idx+1;
Serial.printf("testData[%d]\n", idx);

if (decode_status == DECODE_OK) {
Expand Down

0 comments on commit 93fe73f

Please sign in to comment.