Abhinav KrishnaAmritha M
Published © MIT

EleTect 1.5 : Smarter Warnings, Safer journeys

An Edge-AI-powered, solar-run wildlife alert system that uses LoRa and intelligent signage to protect both elephants and people.

IntermediateFull instructions providedOver 2 days73
EleTect 1.5 : Smarter Warnings, Safer journeys

Things used in this project

Hardware components

Grove Vision AI Module V2
Seeed Studio Grove Vision AI Module V2
×1
XIAO ESP32C3
Seeed Studio XIAO ESP32C3
×1
Camera Module
Raspberry Pi Camera Module
×1
5 mm LED: Red
5 mm LED: Red
×400
Through Hole Resistor, 68 ohm
Through Hole Resistor, 68 ohm
×200
MOSFET Transistor, Switching
MOSFET Transistor, Switching
×1
Solar panel
×1
LORA E5
×1
Camera Module
Raspberry Pi Camera Module
×1
Lora Antenna
×1

Software apps and online services

Edge Impulse Studio
Edge Impulse Studio
Arduino IDE
Arduino IDE
Fusion
Autodesk Fusion
Roboflow
Google collab
SenseCraft AI
Seeed Studio SenseCraft AI

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
3D Printer (generic)
3D Printer (generic)
Laser cutter (generic)
Laser cutter (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Custom parts and enclosures

Clamp

Sketchfab still processing.

Full Assembly

Schematics

Casing

Enclosure

Code

Code

C/C++
#include <Arduino.h>
#include <LoRaE5.h>

#define LED_PIN 5   // LED/Signboard pin
#define LORA_RX 6
#define LORA_TX 7

HardwareSerial loraSerial(1);

// State flags
bool elephantPresent = false;
bool vehiclePresent = false;

unsigned long lastBlink = 0;
bool ledState = false;

void setup() {
  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, LOW);

  Serial.begin(115200);  // Debug
  loraSerial.begin(9600, SERIAL_8N1, LORA_RX, LORA_TX);  // LoRa

  Serial.println("Signboard Node Ready");
}

void loop() {
  // 1. Listen for LoRa messages
  if (loraSerial.available()) {
    String msg = loraSerial.readStringUntil('\n');
    msg.trim();
    Serial.println("LoRa IN: " + msg);

    if (msg == "ELEPHANT_DETECTED") {
      elephantPresent = true;
    } else if (msg == "ELEPHANT_LEFT") {
      elephantPresent = false;
      vehiclePresent = false;
      digitalWrite(LED_PIN, LOW);
    }
  }

  // 2. Read Vision AI V2 serial output (vehicle detection)
  if (Serial.available()) {
    String visionData = Serial.readStringUntil('\n');
    visionData.trim();

    if (visionData == "vehicle") {
      vehiclePresent = true;
      if (elephantPresent) {
        loraSerial.println("VEHICLE_PRESENT");
        Serial.println("Vehicle present → Sent alert to EleTect Node");
      }
    } else {
      vehiclePresent = false;
    }
  }

  // 3. Flash LED if elephant detected
  if (elephantPresent) {
    if (millis() - lastBlink > 500) {  // Blink every 500ms
      ledState = !ledState;
      digitalWrite(LED_PIN, ledState ? HIGH : LOW);
      lastBlink = millis();
    }
  }
}

Credits

Abhinav Krishna
8 projects • 55 followers
Maker | IoT Enthusiast | Electronics hobbyist
Amritha M
2 projects • 8 followers

Comments