debut td2

This commit is contained in:
OMGiTzPomPom 2022-10-13 13:55:04 +02:00
parent f2806ccce1
commit 413d94e90b
4 changed files with 34 additions and 17 deletions

View File

@ -5,8 +5,6 @@ void setup() {
Serial.begin(9600); Serial.begin(9600);
while (!Serial); while (!Serial);
Serial.println("Applejack is best pony ! Received by Pauline Srifi ~");
if (!LoRa.begin(864E6)) { if (!LoRa.begin(864E6)) {
Serial.println("Starting LoRa failed!"); Serial.println("Starting LoRa failed!");
while (1); while (1);

View File

@ -7,7 +7,7 @@ void setup() {
Serial.begin(9600); Serial.begin(9600);
while (!Serial); while (!Serial);
Serial.println("Applejack is best pony ! Send by Pauline Srifi ~"); //Serial.println("Applejack is best pony ! Send by Pauline Srifi ~");
if (!LoRa.begin(864E6)) { if (!LoRa.begin(864E6)) {
Serial.println("Starting LoRa failed!"); Serial.println("Starting LoRa failed!");
@ -15,7 +15,7 @@ void setup() {
} }
} }
int generateRandomTemp() { //-50 to 150 int generateRandomTemp() { //50 to 250
int r = (rand() % (150 - (-50) + 1)) + (-50); int r = (rand() % (150 - (-50) + 1)) + (-50);
return r; return r;
} }
@ -24,9 +24,8 @@ void loop() {
int temp = generateRandomTemp(); int temp = generateRandomTemp();
// send packet // send packet
LoRa.beginPacket(); LoRa.beginPacket();
LoRa.print("Pauline temp is ");
LoRa.print(temp); LoRa.print(temp);
LoRa.println("°."); Serial.println("envoi de " + temp);
LoRa.endPacket(); LoRa.endPacket();
counter++; counter++;

View File

@ -9,7 +9,7 @@ ser.timeout=10
ser.open() ser.open()
f=open('datas.csv','w') f=open('datas.csv','w')
for uwu in range(0,10) : for uwu in range(0,30) :
x = ser.readline() x = ser.readline()
t = datetime.datetime.now() t = datetime.datetime.now()

View File

@ -1,10 +1,30 @@
b'Applejack is best pony ! Received by Pauline Srifi ~\r\n'; 2022-09-15 16:16:06.340607 b'LoRa Receiver\r\n'; 2022-10-06 15:46:03.754135
b'h%l\xcc\x12.\x9d\x14\x13Pauline temp is 115\xc2\xb0.\r\n'; 2022-09-15 16:16:09.275030 b"Received packet 'Pauline temp is 119\xc2\xb0.\r\n"; 2022-10-06 15:46:04.628907
b'Pauline temp is 121\xc2\xb0.\r\n'; 2022-09-15 16:16:14.333684 b"' with RSSI -18\r\n"; 2022-10-06 15:46:04.628907
b'Pauline temp is -1\xc2\xb0.\r\n'; 2022-09-15 16:16:19.390743 b"Received packet 'Pauline temp is 75\xc2\xb0.\r\n"; 2022-10-06 15:46:09.686425
b'Pauline temp is -43\xc2\xb0.\r\n'; 2022-09-15 16:16:24.449501 b"' with RSSI -19\r\n"; 2022-10-06 15:46:09.686425
b'Pauline temp is -26\xc2\xb0.\r\n'; 2022-09-15 16:16:29.507680 b"Received packet 'Pauline temp is -45\xc2\xb0.\r\n"; 2022-10-06 15:46:14.745451
b'Pauline temp is -24\xc2\xb0.\r\n'; 2022-09-15 16:16:34.566655 b"' with RSSI -18\r\n"; 2022-10-06 15:46:14.746421
b'Pauline temp is 112\xc2\xb0.\r\n'; 2022-09-15 16:16:39.624938 b"Received packet 'Pauline temp is 126\xc2\xb0.\r\n"; 2022-10-06 15:46:19.805067
b'Pauline temp is -50\xc2\xb0.\r\n'; 2022-09-15 16:16:44.681967 b"' with RSSI -18\r\n"; 2022-10-06 15:46:19.807069
b'Pauline temp is -2\xc2\xb0.\r\n'; 2022-09-15 16:16:49.740181 b"Received packet 'Pauline temp is 31\xc2\xb0.\r\n"; 2022-10-06 15:46:24.862189
b"' with RSSI -18\r\n"; 2022-10-06 15:46:24.862845
b"Received packet 'Pauline temp is 93\xc2\xb0.\r\n"; 2022-10-06 15:46:29.919918
b"' with RSSI -18\r\n"; 2022-10-06 15:46:29.921870
b"Received packet 'Pauline temp is 125\xc2\xb0.\r\n"; 2022-10-06 15:46:34.980235
b"' with RSSI -18\r\n"; 2022-10-06 15:46:34.982238
b"Received packet 'Pauline temp is -32\xc2\xb0.\r\n"; 2022-10-06 15:46:40.038848
b"' with RSSI -19\r\n"; 2022-10-06 15:46:40.040878
b"Received packet 'Pauline temp is 29\xc2\xb0.\r\n"; 2022-10-06 15:46:45.096257
b"' with RSSI -19\r\n"; 2022-10-06 15:46:45.097299
b"Received packet 'Pauline temp is 115\xc2\xb0.\r\n"; 2022-10-06 15:46:50.155526
b"' with RSSI -19\r\n"; 2022-10-06 15:46:50.157563
b"Received packet 'Pauline temp is 121\xc2\xb0.\r\n"; 2022-10-06 15:46:55.214600
b"' with RSSI -19\r\n"; 2022-10-06 15:46:55.216627
b"Received packet 'Pauline temp is -1\xc2\xb0.\r\n"; 2022-10-06 15:47:00.271691
b"' with RSSI -19\r\n"; 2022-10-06 15:47:00.271691
b"Received packet 'Pauline temp is -43\xc2\xb0.\r\n"; 2022-10-06 15:47:05.331263
b"' with RSSI -18\r\n"; 2022-10-06 15:47:05.333305
b"Received packet 'Pauline temp is -26\xc2\xb0.\r\n"; 2022-10-06 15:47:10.389773
b"' with RSSI -19\r\n"; 2022-10-06 15:47:10.389773
b"Received packet 'Pauline temp is -24\xc2\xb0.\r\n"; 2022-10-06 15:47:15.448382

Can't render this file because it contains an unexpected character in line 2 and column 2.