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,11 +76,13 @@ void loop() {
for (int i = 0; i < micValuesLength; i ++) {
micValues[i] = analogRead(micPin) << 2;
}
if (encryption)
encryptDecyptData();
radio.write(micValues, 32);
} else { // receive
if (radio.available()) {
radio.read(micValues, 32);
if (encryption)
encryptDecyptData();
for (int i = 0; i < micValuesLength; i++) {
PORTD = micValues[i];