aboutsummaryrefslogtreecommitdiff
path: root/sensor
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-04-15 13:46:03 +0200
committerJonas Smedegaard <dr@jones.dk>2025-04-15 14:19:53 +0200
commitcf8a28dd7eec3b21c7719c70372b44fc31b422f7 (patch)
tree4ed1476beadeeb91429b14021cc8dd125e56596f /sensor
parent7b5fb81fc7927809db90c1b093a0de939a54ecd9 (diff)
drop unused define INSTANCE_ID; refine comments
Diffstat (limited to 'sensor')
-rw-r--r--sensor/sensor.ino13
1 files changed, 6 insertions, 7 deletions
diff --git a/sensor/sensor.ino b/sensor/sensor.ino
index 5a1f075..b9c13ab 100644
--- a/sensor/sensor.ino
+++ b/sensor/sensor.ino
@@ -22,7 +22,7 @@
/// @see <https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z2tFBF4gN7ziG9oXtUytVQNYe3VhQ/tree/Mussel/README.md>
/// @see <https://moodle.ruc.dk/course/view.php?id=23504>
-// include and refine ESP32 Logging system
+// arduino-esp32 Logging system
// activate in Arduino IDE: Tools -> Core Debug Level
#define CONFIG_ARDUHAL_ESP_LOG 1
#define LOG_LOCAL_LEVEL CORE_DEBUG_LEVEL
@@ -32,6 +32,7 @@
ARDUHAL_LOG_COLOR_##letter "[" #letter "] %s(): " format \
ARDUHAL_LOG_RESET_COLOR "\r\n", __FUNCTION__
+// arduino-esp32 Bluetooth Low Energy (BLE) networking stack
#include "BLEDevice.h"
#include "BLEBeacon.h"
#include "BLEAdvertising.h"
@@ -39,23 +40,21 @@
// Adjust these for production use
//
+// * BEACON_NAME must be unique within deployment
// * BEACON_UUID should be unique for each deployment
-// * INSTANCE_ID should be unique for each sensor
//
// @see https://www.uuidgenerator.net/
#define BEACON_NAME "Dummy mussel sensor"
#define BEACON_UUID "00000000-0000-0000-0000-000000000000"
-#define INSTANCE_ID "0xbeac0101"
+// maximum accumulated stress
#define STRESS_MAX 50
-// touch sensor using ESP32 Touch sensor
-// https://docs.espressif.com/projects/arduino-esp32/en/latest/api/touch.html
+// arduino-esp32 Touch sensor
#define TOUCH_PIN T0 // T0 is GPIO4
#define TOUCH_THRESHOLD 40
-// pacemaker using ESP32 LED PWM Controller (LEDC)
-// https://docs.espressif.com/projects/arduino-esp32/en/latest/api/ledc.html
+// arduino-esp32 LED PWM Controller (LEDC) to track gaping rhythm
#define LED_PIN LED_BUILTIN
#define LEDC_BITS 7
#define LEDC_FREQ 500