encryption is now optionable

This commit is contained in:
leca 2023-07-14 03:07:08 +03:00
parent 4e99417d29
commit 73fac23981
1 changed files with 4 additions and 2 deletions

View File

@ -76,12 +76,14 @@ void loop() {
for (int i = 0; i < micValuesLength; i ++) { for (int i = 0; i < micValuesLength; i ++) {
micValues[i] = analogRead(micPin) << 2; micValues[i] = analogRead(micPin) << 2;
} }
encryptDecyptData(); if (encryption)
encryptDecyptData();
radio.write(micValues, 32); radio.write(micValues, 32);
} else { // receive } else { // receive
if (radio.available()) { if (radio.available()) {
radio.read(micValues, 32); radio.read(micValues, 32);
encryptDecyptData(); if (encryption)
encryptDecyptData();
for (int i = 0; i < micValuesLength; i++) { for (int i = 0; i < micValuesLength; i++) {
PORTD = micValues[i]; PORTD = micValues[i];
} }