Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug fix for ADC disable after readVcc

  • Loading branch information...
commit 6a9e584bfaf5c7bb2c21667d84975b72a1e2fada 1 parent 4958a1c
@nathanchantrell authored
View
2  TinyTX_DHT22/TinyTX_DHT22.ino
@@ -143,6 +143,6 @@ void loop() {
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate Vcc in mV
- return result;
ADCSRA &= ~ bit(ADEN); bitSet(PRR, PRADC); // Disable the ADC to save power
+ return result;
}
View
2  TinyTX_DS18B20/TinyTX_DS18B20.ino
@@ -139,6 +139,6 @@ void loop() {
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate Vcc in mV
- return result;
ADCSRA &= ~ bit(ADEN); bitSet(PRR, PRADC); // Disable the ADC to save power
+ return result;
}
View
2  TinyTX_LDR/TinyTX_LDR.ino
@@ -120,6 +120,6 @@ void loop() {
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate Vcc in mV
- return result;
ADCSRA &= ~ bit(ADEN); bitSet(PRR, PRADC); // Disable the ADC to save power
+ return result;
}
View
2  TinyTX_LDR_Meter/TinyTX_LDR_Meter.ino
@@ -152,6 +152,6 @@ void loop() {
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate Vcc in mV
- return result;
ADCSRA &= ~ bit(ADEN); bitSet(PRR, PRADC); // Disable the ADC to save power
+ return result;
}
View
2  TinyTX_ReedSwitch/TinyTX_ReedSwitch.ino
@@ -139,6 +139,6 @@ void loop() {
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate Vcc in mV
- return result;
ADCSRA &= ~ bit(ADEN); bitSet(PRR, PRADC); // Disable the ADC to save power
+ return result;
}
View
2  TinyTX_TMP36/TinyTX_TMP36.ino
@@ -146,6 +146,6 @@ void loop() {
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate Vcc in mV
- return result;
ADCSRA &= ~ bit(ADEN); bitSet(PRR, PRADC); // Disable the ADC to save power
+ return result;
}
View
2  TinyTX_Water/TinyTX_Water.ino
@@ -130,6 +130,6 @@ void loop() {
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate Vcc in mV
- return result;
ADCSRA &= ~ bit(ADEN); bitSet(PRR, PRADC); // Disable the ADC to save power
+ return result;
}
Please sign in to comment.
Something went wrong with that request. Please try again.