Earth Analyzer: Kit Avanzado IoT de Sensores para Monitorización Ambiental
Componentes y materiales
- 1x Módulo WiFi Bolt IoT
- 1x Arduino UNO
- 1x Arduino Nano R3
- 2x nRF24L01 (radio 2.4 GHz)
- 2x Motor DC 12V
- 1x DFRobot Solar Power Manager para batería plomo‑ácido 12V
- 1x Driver doble puente H L298 (SparkFun)
- 1x Cables jumper
- 1x Sensor temperatura LM35
- 1x Sensor capacitivo humedad suelo DFRobot Gravity (resistente a corrosión)
- 1x Micro‑servo SG90
- 1x Joystick 10 kΩ
Herramientas necesarias
- Soldador
- Hilo de soldar sin plomo
- Flux para soldar
- Multiusos / destornillador
Aplicaciones y servicios online
- Arduino IDE
- Bolt IoT Bolt Cloud
- Integromat
- Twilio SMS Messaging API
- Mailgun
- Bolt IoT Android App
- Bolt IoT iOS App
Sobre el proyecto
HOLA A TODOS
Este proyecto es un rover para agricultura que ayuda a los agricultores. Consta de tres módulos.
MÓDULO 1: Control de motores y sensores vía Bolt
Dos motores DC + driver L298. Conecta V+, EN1, EN2 a punto común en protoboard; cuatro salidas del driver a entradas del motor. Pines de salida del driver a Arduino y batería según diagrama.


Conecta los mismos 4 pines a pines digitales del Bolt (0,1,2,3).

Sensor de suelo a pin digital 4 del Bolt. Sensor temperatura LM35 a pin analógico A0 del Bolt.

Todos los GND y VCC (sensores, EN1, EN2) a 5V del Arduino; alimentación final con baterías.

MÓDULO 2: Control local por radio nRF24L01
Módulo nRF24L01 para comunicación radio de corto alcance.



Dos joysticks: uno para dirección del rover, otro para el servo.

MÓDULO 3: Alertas por Telegram, SMS y Email (Integromat + IFTTT + Google Assistant)
Código Arduino – Transmisor (joysticks)
#include <SPI.h>
#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>
RF24 radio(7, 8); // CSN, CE
const byte address[6] = "00001";
int x_key = A1, y_key = A0, p_key = A3, q_key = A2;
int x_pos, y_pos, p_pos, q_pos;
void setup() {
radio.begin(); radio.openWritingPipe(address);
radio.setPALevel(RF24_PA_MIN); radio.setChannel(87);
radio.setDataRate(RF24_250KBPS); radio.stopListening();
Serial.begin(9600);
pinMode(x_key, INPUT); pinMode(y_key, INPUT);
pinMode(p_key, INPUT); pinMode(q_key, INPUT);
}
void loop() {
x_pos = analogRead(x_key); y_pos = analogRead(y_key);
p_pos = analogRead(p_key); q_pos = analogRead(q_key);
Serial.println(x_pos); Serial.println(y_pos);
Serial.println(p_pos); Serial.println(q_pos);
int pos;
if (p_pos>400 && p_pos<600 && q_pos>400 && q_pos<600) {
if (x_pos>400 && x_pos<600 && y_pos>400 && y_pos<600) { pos=100; radio.write(&pos,sizeof(pos)); }
if (x_pos>400 && x_pos<600 && y_pos<400) { pos=200; radio.write(&pos,sizeof(pos)); }
if (x_pos>400 && x_pos<600 && y_pos>600) { pos=300; radio.write(&pos,sizeof(pos)); }
if (y_pos>400 && y_pos<600 && x_pos<400) { pos=400; radio.write(&pos,sizeof(pos)); }
if (y_pos>400 && y_pos<600 && x_pos>600) { pos=500; radio.write(&pos,sizeof(pos)); }
Serial.println(pos); delay(100);
} else if (p_pos<400 || p_pos>600) {
if (p_pos<400) { pos=600; radio.write(&pos,sizeof(pos)); }
if (p_pos>600) { pos=700; radio.write(&pos,sizeof(pos)); }
delay(100);
}
}
Código Arduino – Receptor (rover)
#include <SPI.h>
#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>
#include <Servo.h>
Servo servo;
RF24 radio(7, 8);
const byte address[6] = "00001";
int servo_pin = 9, sensor_pin = A0, output_value;
void setup() {
Serial.begin(9600); radio.begin(); servo.attach(servo_pin);
radio.openReadingPipe(0, address); radio.setPALevel(RF24_PA_MIN);
radio.setChannel(87); radio.setDataRate(RF24_250KBPS); radio.startListening();
}
void loop() {
int pos;
if (radio.available()) {
radio.read(&pos, sizeof(pos)); Serial.println(pos);
if (pos==100) { digitalWrite(6,LOW); digitalWrite(5,LOW); digitalWrite(4,LOW); digitalWrite(3,LOW); }
else if (pos==200) { digitalWrite(6,HIGH); digitalWrite(5,LOW); digitalWrite(4,HIGH); digitalWrite(3,LOW); delay(10); }
else if (pos==300) { digitalWrite(6,LOW); digitalWrite(5,HIGH); digitalWrite(4,LOW); digitalWrite(3,HIGH); delay(10); }
else if (pos==400) { digitalWrite(6,LOW); digitalWrite(5,HIGH); digitalWrite(4,HIGH); digitalWrite(3,LOW); delay(10); }
else if (pos==500) { digitalWrite(6,HIGH); digitalWrite(5,LOW); digitalWrite(4,LOW); digitalWrite(3,HIGH); delay(10); }
else if (pos==600) { servo.write(90); delay(10); }
else if (pos==700) { servo.write(180); delay(10); }
} else { Serial.println("connection lost"); }
}
Alertas por Telegram (código Python en servidor, ej. repl.it)
main.py
import requests, json, time
from boltiot import Bolt
import conf
mybolt = Bolt(conf.bolt_api_key, conf.device_id)
def get_sensor_value_from_pin(pin):
try:
response = mybolt.digitalRead(pin)
data = json.loads(response)
if data["success"] != 1: print("Request not successful"); return -999
return int(data["value"])
except Exception as e: print("Error reading sensor"); print(e); return -999
def send_telegram_message(message):
url = "https://api.telegram.org/" + conf.telegram_bot_id + "/sendMessage"
data = {"chat_id": conf.telegram_chat_id, "text": message}
try:
response = requests.request("GET", url, params=data)
print("Telegram response:", response.text)
return json.loads(response.text)["ok"]
except Exception as e: print("Error sending Telegram"); print(e); return False
while True:
sensor_value = get_sensor_value_from_pin("4")
print("Current sensor value:", sensor_value)
if sensor_value == -999: time.sleep(10); continue
if sensor_value >= conf.threshold:
message = "The moisture value is just greater than threshold"
telegram_status = send_telegram_message(message)
print("Telegram status:", telegram_status)
time.sleep(100)
conf.py
bolt_api_key = "XXXX"
device_id = "XXXX"
telegram_chat_id = "@XXXX"
telegram_bot_id = "botXXXX"
threshold = 0
Introduce tus claves de bot y API.
Mensajería de alerta con Telegram
Telegram es app de mensajería tipo WhatsApp, gratis, multiplataforma.

Canal: herramienta de difusión a audiencias ilimitadas, URL permanente, contador de vistas.
Bot: aplicación de terceros dentro de Telegram; interactúa por mensajes/comandos. Usaremos bots para enviar alertas al canal.
Crear bot: Busca "BotFather" en Telegram, comando /newbot, guarda el token (formato botTOKEN).
Añadir bot al canal: Administradores → buscar bot → dar permiso "Post Messages".
Integración Twilio (SMS) y Mailgun (Email) vía Integromat + IFTTT + Google Assistant
Recibe valores del sensor LM35 por SMS/Email diciendo "Envíame el valor del sensor" a Google Assistant.

- Hardware: LM35 (pines VCC, salida, GND) → 5V, A0, GND del Bolt WiFi. Alimenta Bolt (5V) con internet activo.
- Integromat – Módulo IFTTT: Crea escenario, añade IFTTT "Receive Data", guarda webhook URL.
- Integromat – Módulo HTTP: Petición GET a
https://cloud.boltiot.com/remote/TU_API_KEY/analogRead?pin=A0&deviceName=BOLTXXXX. Devuelve JSON{"value":"XXX","success":"1"}. - Integromat – Router + Mailgun: Extrae valor numérico (substring), divide por 10.24 para °C, envía email.
- Integromat – Twilio: Envía SMS con mismo valor.
- Programación: Activa "Scheduling" → "Run scenario Immediately".
- IFTTT – Applet: "Google Assistant" → "Say a simple phrase" (ej. "envía valor temperatura") → "Webhooks" → "Make a web request" (POST a webhook Integromat).









¡Listo! Di "Ok Google, envía el valor del sensor de temperatura" y recibe SMS/Email.
Esquemáticos




¡SUBE TODO Y PRUEBA! Dudas en comentarios. GRACIAS.
Código
RECEPTOR FINAL
#include <SPI.h> #include <nRF24L01.h> #include <printf.h> #include <RF24.h> #include <RF24_config.h> #include <Servo.h>
Servo servo; RF24 radio(7, 8); const byte address[6] = "00001"; int servo_pin = 9; int sensor_pin=A0; int output_value;
void setup() { Serial.begin(9600); radio.begin(); servo.attach(servo_pin); radio.openReadingPipe(0, address); radio.setPALevel(RF24_PA_MIN); radio.setChannel(87); radio.setDataRate(RF24_250KBPS); radio.startListening(); }
void loop() { int pos; if (radio.available()) { radio.read(&pos, sizeof(pos)); Serial.println(pos); if(pos==100){ digitalWrite(6,LOW); digitalWrite(5,LOW); digitalWrite(4,LOW); digitalWrite(3,LOW); } else if(pos==200){ digitalWrite(6,HIGH); digitalWrite(5,LOW); digitalWrite(4,HIGH); digitalWrite(3,LOW); delay(10); } else if(pos==300){ digitalWrite(6,LOW); digitalWrite(5,HIGH); digitalWrite(4,LOW); digitalWrite(3,HIGH); delay(10); } else if(pos==400){ digitalWrite(6,LOW); digitalWrite(5,HIGH); digitalWrite(4,HIGH); digitalWrite(3,LOW); delay(10); } else if(pos==500){ digitalWrite(6,HIGH); digitalWrite(5,LOW); digitalWrite(4,LOW); digitalWrite(3,HIGH); delay(10); } else if(pos==600){ servo.write(90); delay(10); } else if(pos==700){ servo.write(180); delay(10); } } else { Serial.println("connection lost"); } }
TRANSMISOR FINAL
#include <SPI.h> #include <nRF24L01.h> #include <printf.h> #include <RF24.h> #include <RF24_config.h>
RF24 radio(7, 8); const byte address[6] = "00001"; int x_key = A1; int y_key = A0; int p_key = A3; int q_key = A2; int x_pos; int y_pos; int p_pos; int q_pos;
void setup() { radio.begin(); radio.openWritingPipe(address); radio.setPALevel(RF24_PA_MIN); radio.setChannel(87); radio.setDataRate(RF24_250KBPS); radio.stopListening(); Serial.begin(9600); pinMode(x_key, INPUT); pinMode(y_key, INPUT); pinMode(p_key, INPUT); pinMode(q_key, INPUT); }
void loop() { x_pos = analogRead(x_key); y_pos = analogRead(y_key); p_pos = analogRead(p_key); q_pos = analogRead(q_key); Serial.println(x_pos); Serial.println(y_pos); Serial.println(p_pos); Serial.println(q_pos); int pos; if (p_pos>400 && p_pos<600 && q_pos>400 && q_pos<600) { if(x_pos>400 && x_pos<600 && y_pos>400 && y_pos<600){ pos=100; radio.write(&pos,sizeof(pos)); } if(x_pos>400 && x_pos<600 && y_pos<400){ pos=200; radio.write(&pos,sizeof(pos)); } if(x_pos>400 && x_pos<600 && y_pos>600){ pos=300; radio.write(&pos,sizeof(pos)); } if(y_pos>400 && y_pos<600 && x_pos<400){ pos=400; radio.write(&pos,sizeof(pos)); } if(y_pos>400 && y_pos<600 && x_pos>600){ pos=500; radio.write(&pos,sizeof(pos)); } Serial.println(pos); delay(100); } else if(p_pos<400 || p_pos>600) { if(p_pos<400){ pos=600; radio.write(&pos,sizeof(pos)); } if(p_pos>600){ pos=700; radio.write(&pos,sizeof(pos)); } delay(100); } }
Proceso de manufactura
- Construye un Spybot controlado por Bluetooth con Arduino
- FlickMote: Mando IR por gestos para Smart Home
- TV‑B‑Gone DIY con Arduino: Mando universal para apagar cualquier TV
- Construye un Reloj Maestro LED Personalizado con Alarma – Visible desde 12 Metros
- Find Me: Localizador Inteligente de Objetos con Arduino y Bluetooth
- Soluciones de Alimentación Optimizadas para Proyectos Arduino
- Tres en raya con Arduino, matriz LED MAX7219 y carcasa de cartón
- Construye un Robot Cuadrúpedo Inteligente con Arduino: Guía Paso a Paso
- Control de brillo LED sin interrupciones con Bolt IoT y Arduino UNO
- Construye un volante joystick personalizado con Arduino para gaming
- Construye una Máquina CNC Totalmente Funcional con Arduino Nano R3