Skip to content

Instantly share code, notes, and snippets.

@HamishB
HamishB / max31850_conversion_time_fix.patch
Created August 17, 2018 05:11
patch for adafruit/MAX31850_DallasTemp issue #1
--- MAX31850_DallasTemp.cpp.ORIG 2015-04-01 08:09:15.000000000 +1300
+++ MAX31850_DallasTemp.cpp 2018-08-17 17:03:54.633771256 +1200
@@ -371,25 +371,29 @@
unsigned long start = millis();
while(!isConversionAvailable(0) && ((millis() - start) < 750));
}
-
- // Wait a fix number of cycles till conversion is complete (based on IC datasheet)
- switch (*bitResolution)
+
@HamishB
HamishB / Adafruit_ADS1x15.py.patch
Created April 24, 2014 08:39
patch for adafruit/Adafruit-Raspberry-Pi-Python-Code/ADS1x15/Adafruit_ADS1x15.py
--- Adafruit_ADS1x15.py.ORIG 2014-04-24 20:20:39.652528689 +1200
+++ Adafruit_ADS1x15.py 2014-04-24 20:26:33.162423221 +1200
@@ -180,12 +180,12 @@
config |= self.spsADS1015.setdefault(sps, self.__ADS1015_REG_CONFIG_DR_1600SPS)
else:
if ( (sps not in self.spsADS1115) & self.debug):
- print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps
+ print "ADS1x15: Invalid sps specified: %d, using 250sps" % sps
config |= self.spsADS1115.setdefault(sps, self.__ADS1115_REG_CONFIG_DR_250SPS)