🔌 Arduino Uno + Wemos D1 Wiring Guide

Complete connection diagram for your 3-sensor monitoring system

🔵 Arduino Uno

Your current setup with sensors

📍 Current Sensor Connections:

  • D2 Flame Sensor (DO_PIN)
  • A3 Vibration Sensor
  • A0 Water Sensor (Analog)
  • D13 LED Green (Vibration)
  • D12 LED Red (Heat)
  • D9 LED Blue (Water)
  • D10 MP3 Player RX
  • D11 MP3 Player TX

🔗 Wemos D1 Connection:

  • TX (D1) Serial Transmit → Wemos RX
  • GND Ground → Wemos GND

🔴 Wemos D1 (ESP8266)

WiFi module for Flutter app

🔗 Arduino Connection:

  • RX (D8) Serial Receive ← Arduino TX
  • GND Ground ← Arduino GND

⚡ Power Supply:

  • 5V Power from USB or separate supply

📡 WiFi:

  • Built-in Connects to your WiFi network

📊 Wiring Connection Table

Arduino Uno Pin → Wemos D1 Pin Connection Type Purpose
TX (D1) → RX (D8) SERIAL DATA Send sensor data from Arduino to Wemos
GND → GND GROUND Common ground reference

🎨 Visual Connection Diagram

🔵
Arduino Uno
TX (Pin D1)
GND
TX
RX
GND
GND
🔴
Wemos D1
RX (Pin D8)
GND

⚠️ Important Notes

  • Serial Communication: Arduino TX connects to Wemos RX. Data flows ONE WAY (Arduino → Wemos)
  • Ground Connection: MUST connect GND to GND for proper communication
  • Power Supply: Power Arduino Uno and Wemos D1 separately (both via USB or external power)
  • Baud Rate: Both devices use 9600 baud rate (already set in your code)
  • Data Format: Arduino sends: "HD:0,VD:1,WD:0,WL:450" every 500ms
  • No RX Connection Needed: Since Arduino only SENDS data, you don't need to connect Arduino RX to Wemos TX
  • WiFi Setup: Update WiFi credentials in Wemos D1 code before uploading
  • Testing: Open Serial Monitor on both Arduino IDE ports to verify data transmission