aboutsummaryrefslogtreecommitdiff
path: root/Mussel
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-04-13 13:03:53 +0200
committerJonas Smedegaard <dr@jones.dk>2025-04-13 13:03:53 +0200
commited3ac0eb11a04630f7f08124a484a854eea13569 (patch)
treedb1abdc77f1bca0d757d9f14d73830ff8509c400 /Mussel
parent9c84a009850a06e090b258b6b160ca2cdb41706e (diff)
rename and describe bluetooth examples
Diffstat (limited to 'Mussel')
-rw-r--r--Mussel/examples/read_to_EddystoneTLM/EddystoneTLM_Beacon.md14
-rw-r--r--Mussel/examples/read_to_EddystoneTLM/ci.json6
-rw-r--r--Mussel/examples/sensor/Mussel_Sensor_Beacon.md7
-rw-r--r--Mussel/examples/sensor/sensor.ino (renamed from Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.ino)0
-rw-r--r--Mussel/examples/sensor/sensor.puml (renamed from Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.puml)0
-rw-r--r--Mussel/examples/vote/Mussel_Beacon_Voting.md20
-rw-r--r--Mussel/examples/vote/vote.ino (renamed from Mussel/examples/voting_from_EddystoneTLM/voting_from_EddystoneTLM.ino)0
-rw-r--r--Mussel/examples/vote/vote.puml (renamed from Mussel/examples/voting_from_EddystoneTLM/voting_from_EddystoneTLM.puml)1
-rw-r--r--Mussel/examples/voting_from_EddystoneTLM/Beacon_Scanner.md9
-rw-r--r--Mussel/examples/voting_from_EddystoneTLM/ci.json6
10 files changed, 27 insertions, 36 deletions
diff --git a/Mussel/examples/read_to_EddystoneTLM/EddystoneTLM_Beacon.md b/Mussel/examples/read_to_EddystoneTLM/EddystoneTLM_Beacon.md
deleted file mode 100644
index 2e34029..0000000
--- a/Mussel/examples/read_to_EddystoneTLM/EddystoneTLM_Beacon.md
+++ /dev/null
@@ -1,14 +0,0 @@
-## Eddystone TLM beacon
-EddystoneTLM beacon by BeeGee based on
-[pcbreflux ESP32 Eddystone TLM deepsleep](https://github.com/pcbreflux/espressif/blob/master/esp32/arduino/sketchbook/ESP32_Eddystone_TLM_deepsleep/ESP32_Eddystone_TLM_deepsleep.ino)
-
-[EddystoneTLM frame specification](https://github.com/google/eddystone/blob/master/eddystone-tlm/tlm-plain.md)
-
- Create a BLE server that will send periodic Eddystone TLM frames.
- The design of creating the BLE server is:
- 1. Create a BLE Server
- 2. Create advertising data
- 3. Start advertising.
- 4. wait
- 5. Stop advertising.
- 6. deep sleep
diff --git a/Mussel/examples/read_to_EddystoneTLM/ci.json b/Mussel/examples/read_to_EddystoneTLM/ci.json
deleted file mode 100644
index abe13a7..0000000
--- a/Mussel/examples/read_to_EddystoneTLM/ci.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "fqbn_append": "PartitionScheme=huge_app",
- "requires": [
- "CONFIG_SOC_BLE_SUPPORTED=y"
- ]
-}
diff --git a/Mussel/examples/sensor/Mussel_Sensor_Beacon.md b/Mussel/examples/sensor/Mussel_Sensor_Beacon.md
new file mode 100644
index 0000000..a9269c6
--- /dev/null
+++ b/Mussel/examples/sensor/Mussel_Sensor_Beacon.md
@@ -0,0 +1,7 @@
+## Mussel Sensor Beacon
+
+1. Reads sensors.
+
+2. Normalises sensor data as a gape angle in the range of 0°C-90°C.
+
+3. Broadcasts normalised sensor data as a beacon on a bluetooth network.
diff --git a/Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.ino b/Mussel/examples/sensor/sensor.ino
index 73e0966..73e0966 100644
--- a/Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.ino
+++ b/Mussel/examples/sensor/sensor.ino
diff --git a/Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.puml b/Mussel/examples/sensor/sensor.puml
index 3f033d1..3f033d1 100644
--- a/Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.puml
+++ b/Mussel/examples/sensor/sensor.puml
diff --git a/Mussel/examples/vote/Mussel_Beacon_Voting.md b/Mussel/examples/vote/Mussel_Beacon_Voting.md
new file mode 100644
index 0000000..33a0893
--- /dev/null
+++ b/Mussel/examples/vote/Mussel_Beacon_Voting.md
@@ -0,0 +1,20 @@
+## Mussel Beacon Voting
+
+1. Scans bluetooth network for beacons.
+
+2. Collects mussel name and gape angle
+as decoded from each detected beacon,
+together with the time of detection in milliseconds since boot.
+
+3. Aligns the collected data
+to the format of ballots for a water quality vote.
+
+4. Qualifies the ballots for criteria of the water quality vote
+(e.g. timeliness and sanity of gape angles).
+
+5. Concludes a vote based on collected, aligned and qualified ballots.
+
+6. Acts on the voting result,
+e.g. turns on a steady light for "code green"
+or a blinking light for "code yellow",
+or turns on a blinking light and shuts off a valve for "code red".
diff --git a/Mussel/examples/voting_from_EddystoneTLM/voting_from_EddystoneTLM.ino b/Mussel/examples/vote/vote.ino
index 25c4720..25c4720 100644
--- a/Mussel/examples/voting_from_EddystoneTLM/voting_from_EddystoneTLM.ino
+++ b/Mussel/examples/vote/vote.ino
diff --git a/Mussel/examples/voting_from_EddystoneTLM/voting_from_EddystoneTLM.puml b/Mussel/examples/vote/vote.puml
index caafc05..a4958f7 100644
--- a/Mussel/examples/voting_from_EddystoneTLM/voting_from_EddystoneTLM.puml
+++ b/Mussel/examples/vote/vote.puml
@@ -1,5 +1,4 @@
@startuml
-'start
:instantiate mussel object;
:instantiate bluetooth object;
group init
diff --git a/Mussel/examples/voting_from_EddystoneTLM/Beacon_Scanner.md b/Mussel/examples/voting_from_EddystoneTLM/Beacon_Scanner.md
deleted file mode 100644
index 34101fe..0000000
--- a/Mussel/examples/voting_from_EddystoneTLM/Beacon_Scanner.md
+++ /dev/null
@@ -1,9 +0,0 @@
-## BLE Beacon Scanner
-
-Initiates a BLE device scan.
-Checks if the discovered devices are
-- an iBeacon
-- an Eddystone TLM beacon
-- an Eddystone URL beacon
-
-and sends the decoded beacon information over Serial log
diff --git a/Mussel/examples/voting_from_EddystoneTLM/ci.json b/Mussel/examples/voting_from_EddystoneTLM/ci.json
deleted file mode 100644
index abe13a7..0000000
--- a/Mussel/examples/voting_from_EddystoneTLM/ci.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "fqbn_append": "PartitionScheme=huge_app",
- "requires": [
- "CONFIG_SOC_BLE_SUPPORTED=y"
- ]
-}