generated from ISPC-TST-Sensores-y-Actuadores/Practica-de-la-7ma-semana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ISPC-TST-Sensores-y-Actuadores/main
Feedback
- Loading branch information
Showing
19 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.82 MB
...CIO E/318020613, LoRa Fiberglass Antenna, 900-930MHz, 7dBi, 920mm - ZCD0915-13W9208NM.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
//Codigo para el receptor LoRa | ||
|
||
#include <SPI.h> | ||
#include <LoRa.h> | ||
#include <Cristal Liquido.h> | ||
|
||
const int rs = 8, en = 7, d4 = 6, d5 = 5, d6 = 4, d7 = 3; //Mencione el numero de pin para la conexion LCD | ||
|
||
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);//Inicializar metodo LCD | ||
|
||
configuracion vacia () { | ||
|
||
Serial.begin(9600); | ||
|
||
lcd.begin(16, 2); | ||
|
||
while (! Serie); | ||
|
||
Serial.println("Receptor LoRa"); | ||
|
||
if (!LoRa.begin(433E6)) { | ||
|
||
Serial.println("¡Error al iniciar LoRa!"); | ||
|
||
while (1); | ||
|
||
} | ||
|
||
} | ||
|
||
bucle vacio () { | ||
|
||
// intenta analizar el paquete | ||
|
||
int TamanoPaquete = LoRa.parsePacket(); | ||
|
||
if (tamano del paquete) { | ||
|
||
// recibi un paquete | ||
|
||
Serial.print("Paquete recibido '"); | ||
|
||
// leer paquete | ||
|
||
while (LoRa.disponible()) { | ||
|
||
char entrante = (char)LoRa.read(); | ||
|
||
if (entrante == 'c'){ | ||
|
||
lcd.setCursor(0, 1); | ||
|
||
} | ||
|
||
else { | ||
|
||
lcd.print(entrante); | ||
|
||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
//Codigo para el remitente LoRa | ||
|
||
#include <SPI.h> | ||
#include <LoRa.h> | ||
#include <DHT.h> | ||
|
||
#define DHTPIN A0 // a que pin estamos conectados | ||
#define TIPO DHT DHT11 // DHT 11 | ||
|
||
DHT dht(DHTPIN, DHTTYPE); | ||
|
||
int zumbido; | ||
|
||
temperatura de flotacion; //Almacena el valor de la temperatura | ||
|
||
contador int = 0; | ||
|
||
configuracion vacia () { | ||
|
||
Serial.begin(9600); | ||
|
||
dht.begin(); | ||
|
||
while (! Serie); | ||
Serial.println("LoRa Remitente"); | ||
|
||
if (!LoRa.begin(433E6)) { | ||
|
||
Serial.println("Error al iniciar LoRa"); | ||
|
||
while (1); | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
bucle vacio () { | ||
temp = dht.readTemperature(); | ||
zumbido = dht.leerHumedad(); | ||
|
||
Serial.print("Enviando paquete: "); | ||
Serial.println(contador); | ||
LoRa.beginPacket(); | ||
LoRa.print("Humedad: "); | ||
LoRa.print(hum); | ||
LoRa.print("c"); | ||
LoRa.print("Temperatura:"); | ||
LoRa.print(temp); | ||
LoRa.endPacket(); | ||
|
||
contador++; | ||
|
||
retraso (5000); | ||
|
||
} |