encryption is now optionable
This commit is contained in:
parent
4e99417d29
commit
73fac23981
|
@ -76,11 +76,13 @@ 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;
|
||||||
}
|
}
|
||||||
|
if (encryption)
|
||||||
encryptDecyptData();
|
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);
|
||||||
|
if (encryption)
|
||||||
encryptDecyptData();
|
encryptDecyptData();
|
||||||
for (int i = 0; i < micValuesLength; i++) {
|
for (int i = 0; i < micValuesLength; i++) {
|
||||||
PORTD = micValues[i];
|
PORTD = micValues[i];
|
||||||
|
|
Loading…
Reference in New Issue