Changed the spammer a little and adjusted some other stuff.
This commit is contained in:
Timm Bogner 2022-07-19 10:08:24 -05:00
parent 6a5e7acd13
commit 1ce8a3eb2b
7 changed files with 20 additions and 17 deletions

View File

@ -12,7 +12,7 @@ void setup() {
beginFDRS();
}
void loop() {
for (int i=0; i < 255; i++) {
for (uint8_t i=0; i < 255; i++) {
loadFDRS(float(i), IT_T);
sendFDRS();
delay(15);

View File

@ -5,7 +5,7 @@
#include <fdrs_globals.h>
#define READING_ID 1 //Unique ID for this sensor
#define GTWY_MAC 0x01 //Address of the nearest gateway
#define GTWY_MAC 0x04 //Address of the nearest gateway
#define USE_ESPNOW
//#define USE_LORA

View File

@ -50,6 +50,9 @@ void setup() {
leds[0] = CRGB::Blue;
FastLED.show();
#endif
#ifdef USE_LORA
begin_lora();
#endif
#ifdef USE_WIFI
delay(10);
WiFi.begin(ssid, password);
@ -68,9 +71,7 @@ void setup() {
#else
begin_espnow();
#endif
#ifdef USE_LORA
begin_lora();
#endif
#ifdef USE_SD_LOG
begin_SD();
#endif
@ -151,7 +152,7 @@ void loop() {
client.loop(); // for recieving incoming messages and maintaining connection
#endif
if (newData) {
if (newData != event_clear) {
switch (newData) {
case event_espnowg:
ESPNOWG_ACT

View File

@ -50,6 +50,9 @@ void setup() {
leds[0] = CRGB::Blue;
FastLED.show();
#endif
#ifdef USE_LORA
begin_lora();
#endif
#ifdef USE_WIFI
delay(10);
WiFi.begin(ssid, password);
@ -68,9 +71,7 @@ void setup() {
#else
begin_espnow();
#endif
#ifdef USE_LORA
begin_lora();
#endif
#ifdef USE_SD_LOG
begin_SD();
#endif
@ -151,7 +152,7 @@ void loop() {
client.loop(); // for recieving incoming messages and maintaining connection
#endif
if (newData) {
if (newData != event_clear) {
switch (newData) {
case event_espnowg:
ESPNOWG_ACT

View File

@ -50,6 +50,9 @@ void setup() {
leds[0] = CRGB::Blue;
FastLED.show();
#endif
#ifdef USE_LORA
begin_lora();
#endif
#ifdef USE_WIFI
delay(10);
WiFi.begin(ssid, password);
@ -68,9 +71,7 @@ void setup() {
#else
begin_espnow();
#endif
#ifdef USE_LORA
begin_lora();
#endif
#ifdef USE_SD_LOG
begin_SD();
#endif
@ -151,7 +152,7 @@ void loop() {
client.loop(); // for recieving incoming messages and maintaining connection
#endif
if (newData) {
if (newData != event_clear) {
switch (newData) {
case event_espnowg:
ESPNOWG_ACT

View File

@ -13,7 +13,6 @@ unsigned int theCount = 0;
unsigned long lastTrigger = 0;
boolean clicked = false;
// Checks if motion was detected, sets LED HIGH and starts a timer
ICACHE_RAM_ATTR void detectsMovement() {
clicked = true;
lastTrigger = millis();
@ -28,7 +27,7 @@ beginFDRS();
void loop() {
if (clicked && millis() - lastTrigger > 100) {
theCount++;
Serial.print("CLICK.");
Serial.print("DINK.");
Serial.println(theCount);
clicked = false;
loadFDRS(theCount, RAINFALL_T);

View File

@ -10,8 +10,9 @@
#define GLOBAL_SSID "Your SSID"
#define GLOBAL_PASS "Password"
#define GLOBAL_MQTT_ADDR "192.168.0.8"
#define GLOBAL_MQTT_PORT 1883
//#define GLOBAL_MQTT_AUTH //uncomment to enable MQTT authentication
//#define GLOBAL_MQTT_AUTH //Enable MQTT authentication
#define GLOBAL_MQTT_USER "Your MQTT Username"
#define GLOBAL_MQTT_PASS "Your MQTT Password"