mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-10 07:10:42 +00:00
dink
Changed the spammer a little and adjusted some other stuff.
This commit is contained in:
parent
6a5e7acd13
commit
1ce8a3eb2b
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user