Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Devasheesh
Created September 5, 2024

Tactile Navigation System

Tactile Navigation System for Indoor Public Spaces Using BLE and Sensor Technologies

18
Tactile Navigation System

Things used in this project

Hardware components

nRF52840 Multi-Protocol SoC
Nordic Semiconductor nRF52840 Multi-Protocol SoC
×1
Seeed Studio XIAO ESP32S3 Sense
Seeed Studio XIAO ESP32S3 Sense
×1
GPS receiver (generic)
×1
GPS receiver (generic)
×1

Story

Read more

Code

code

C/C++
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_TCS34725.h>
#include <BluetoothSerial.h>

BluetoothSerial SerialBT;
const int vibrationPin = 21; // GPIO pin for vibration motor

void setup() {
  Serial.begin(115200);
  SerialBT.begin("IndoorGuide");
  pinMode(vibrationPin, OUTPUT);
  // Initialize sensors and BLE
}

void loop() {
  if (SerialBT.available()) {
    String command = SerialBT.readString();
    if (command == "START_NAVIGATION") {
      // Provide tactile feedback and audio guidance
      digitalWrite(vibrationPin, HIGH);
      delay(500); // Vibrate for 500 ms
      digitalWrite(vibrationPin, LOW);
    }
  }
  // Additional sensor handling and navigation logic
}

code 2

C/C++
#include <bluefruit.h>

// Define BLE service and characteristic
BLEService beaconService("12345678-1234-1234-1234-1234567890ab");
BLECharacteristic beaconCharacteristic("12345678-1234-1234-1234-1234567890ac", BLENotify);

// Setup BLE
void setup() {
  Serial.begin(115200);
  Bluefruit.begin();
  Bluefruit.setName("IndoorBeacon");

  beaconService.begin();
  beaconCharacteristic.setValue("Beacon Data");
  beaconCharacteristic.begin();

  beaconService.start();
  Bluefruit.Advertising.start();
}

void loop() {
  // No additional code needed for this basic beacon
}

Credits

Devasheesh

Devasheesh

1 project • 1 follower

Comments