Skip to content

Instantly share code, notes, and snippets.

View lwalton101's full-sized avatar

Luke Walton lwalton101

View GitHub Profile
// LoRa 9x_TX
// -*- mode: C++ -*-
// Example sketch showing how to create a simple messaging client (transmitter)
// with the RH_RF95 class. RH_RF95 class does not provide for addressing or
// reliability, so you should only use RH_RF95 if you do not need the higher
// level messaging abilities.
// It is designed to work with the other example LoRa9x_RX
#include <SPI.h>
#include <RH_RF95.h>
float randomFloat(float minVal, float maxVal) {
return minVal + (float)random(0, 10000) / 10000.0 * (maxVal - minVal);
}
float tvoc = 23.6;
float eCo2 = 567;
float eTemp = 25.3;
float eHumid = 48.9;
float eBarometric = 1013.2;
float altitude = 87.6;
float ambientLight = 120;
@lwalton101
lwalton101 / client.ino
Last active February 18, 2024 18:08
Range Test
// LoRa 9x_TX
// -*- mode: C++ -*-
// Example sketch showing how to create a simple messaging client (transmitter)
// with the RH_RF95 class. RH_RF95 class does not provide for addressing or
// reliability, so you should only use RH_RF95 if you do not need the higher
// level messaging abilities.
// It is designed to work with the other example LoRa9x_RX
#include <SPI.h>
#include <RH_RF95.h>
import requests, json, datetime, time
shouldStart = False
while not shouldStart:
if datetime.datetime.now().second == 0:
shouldStart = True
else:
print("Waiting for 0 second")