Skip to content

Commit

Permalink
Merge pull request #1 from ISPC-TST-Sensores-y-Actuadores/main
Browse files Browse the repository at this point in the history
Feedback
  • Loading branch information
ProgramadorPegasus authored Oct 28, 2022
2 parents 6749dcb + 01680fc commit 5ba5803
Show file tree
Hide file tree
Showing 19 changed files with 122 additions and 0 deletions.
Binary file added EJERCICIO A/LoRa.pdf
Binary file not shown.
Binary file added EJERCICIO B/Actividad 7ma Semana, 1.B.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions EJERCICIO B/borrar.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions EJERCICIO C/borrar.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file added EJERCICIO C/ejercicio 1.C.docx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added EJERCICIO E/Actividad 7ma Semana. 1.E.pdf
Binary file not shown.
Binary file not shown.
Binary file added EJERCICIO E/DL-IAM-datasheet.pdf
Binary file not shown.
Binary file added EJERCICIO E/DL-PR21-datasheet_2019.pdf
Binary file not shown.
Binary file added EJERCICIO E/Decentlab-DL-LP8P-datasheet.pdf
Binary file not shown.
Binary file added EJERCICIO E/Decentlab-DL-WRM-datasheet-2022.pdf
Binary file not shown.
Binary file added EJERCICIO E/Ejercicio E.pdf
Binary file not shown.
Binary file added EJERCICIO E/LoRa-E5 module datasheet_V1.0.pdf
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions EJERCICIO E/borrar.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

63 changes: 63 additions & 0 deletions EJERCICIO F/Code for receptor.cpp
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);

}

}

}
56 changes: 56 additions & 0 deletions EJERCICIO F/Code for remitente.cpp
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);

}

0 comments on commit 5ba5803

Please sign in to comment.