diff options
Diffstat (limited to 'Mussel/examples/read_to_EddystoneTLM')
4 files changed, 0 insertions, 100 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/read_to_EddystoneTLM/read_to_EddystoneTLM.ino b/Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.ino deleted file mode 100644 index 73e0966..0000000 --- a/Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.ino +++ /dev/null @@ -1,54 +0,0 @@ -/* - EddystoneTLM beacon by BeeGee based on 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 -*/ - -#include <Mussel.h> - -#include "BLEDevice.h" -#include "BLEBeacon.h" -#include "BLEAdvertising.h" -#include "BLEEddystoneTLM.h" - -Mussel mussel(2); - -#define BEACON_POWER ESP_PWR_LVL_N12 - -// See the following for generating UUIDs: -// https://www.uuidgenerator.net/ -BLEAdvertising *pAdvertising; - -#define BEACON_UUID "8ec76ea3-6668-48da-9866-75be8bc86f4d" // UUID 1 128-Bit (may use linux tool uuidgen or random numbers via https://www.uuidgenerator.net/) - -// Check -// https://github.com/google/eddystone/blob/master/eddystone-tlm/tlm-plain.md -// and http://www.hugi.scene.org/online/coding/hugi%2015%20-%20cmtadfix.htm -// for the temperature value. It is a 8.8 fixed-point notation -void setBeacon() { - BLEEddystoneTLM EddystoneTLM; - EddystoneTLM.setTemp(mussel.read()); // 3000 = 30.00 ˚C - Serial.printf("Temperature is %.2f°C\n", EddystoneTLM.getTemp()); - - BLEAdvertisementData oAdvertisementData = BLEAdvertisementData(); - BLEAdvertisementData oScanResponseData = BLEAdvertisementData(); - oScanResponseData.setServiceData(BLEUUID((uint16_t)0xFEAA), String(EddystoneTLM.getData().c_str(), EddystoneTLM.getData().length())); - - oAdvertisementData.setName("ESP32 TLM Beacon"); - pAdvertising->setAdvertisementData(oAdvertisementData); - pAdvertising->setScanResponseData(oScanResponseData); -} - -void setup() { - Serial.begin(115200); - mussel.begin(); - BLEDevice::init("TLMBeacon"); - BLEDevice::setPower(BEACON_POWER); - pAdvertising = BLEDevice::getAdvertising(); - setBeacon(); - pAdvertising->start(); -} - -void loop() { - setBeacon(); - delay(500); -} diff --git a/Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.puml b/Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.puml deleted file mode 100644 index 3f033d1..0000000 --- a/Mussel/examples/read_to_EddystoneTLM/read_to_EddystoneTLM.puml +++ /dev/null @@ -1,26 +0,0 @@ -@startuml -'start -:instantiate mussel object; -:instantiate bluetooth object; -group init -:setup mussel sensors; -:setup bluetooth beacon; -end group -split -while (each 500ms) -group loop { -:read sensors; -:normalize sensor data -as a gape angle; -:add gape angle to beacon; -end group -endwhile --[hidden]-> -kill -split again -while (each 100ms) -:broadcast beacon; -endwhile --[hidden]-> -kill -@enduml |