Permalink
Browse files

io_repeater app: Added a comment to explain the ADC reading.

  • Loading branch information...
1 parent 12d9984 commit 08421420ec941f43bc8c32a3c2fef95541841041 @DavidEGrayson DavidEGrayson committed Jun 22, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 apps/io_repeater/io_repeater.c
View
4 apps/io_repeater/io_repeater.c
@@ -193,6 +193,10 @@ void main(void)
radioQueueTxSendPacket();
lastTx = getMs();
+
+ // Decide when to send the next packet. We take a noisy reading of the temperature sensor
+ // to get two random bits, so that we can avoid accidentally getting synchronized with another
+ // transmtiting Wixel.
txInterval = 7 + (adcRead(14 | ADC_BITS_7) & 3);
}
}

0 comments on commit 0842142

Please sign in to comment.