This commit is contained in:
Lukas
2013-05-14 08:28:05 +02:00
parent 0eec581c8a
commit e12d12238b
8 changed files with 137 additions and 137 deletions
@@ -49,7 +49,7 @@ void INPUT_74HC4051::loop() {
digitalWrite(_s2, r2);
//not sure if nessesary
//delayMicroseconds(10);
value = analogRead(_analog);
value = analogRead(_analog) / 8;
if (_value[pin] < value - INPUT_74HC4051_TOLERANCE || _value[pin] > value + INPUT_74HC4051_TOLERANCE) {
_value[pin] = value;
(*_callbackFunction)(_analog,pin,value);
@@ -69,7 +69,7 @@ int INPUT_74HC4051::getSpecificValue(uint8_t pin) {
digitalWrite(_s1, r1);
digitalWrite(_s2, r2);
//delayMicroseconds(10);
int value = analogRead(_analog);
int value = analogRead(_analog) / 8;
_value[pin] = value;
return value;
}
@@ -13,7 +13,7 @@
#ifndef bombatuino_INPUT_74HC4051_h
#define bombatuino_INPUT_74HC4051_h
#define INPUT_74HC4051_TOLERANCE 1 /**< I/O DIRECTION REGISTER PORT A - Controls the direction of the data I/O. */
#define INPUT_74HC4051_TOLERANCE 0 /**< I/O DIRECTION REGISTER PORT A - Controls the direction of the data I/O. */
#if !defined(CallbackFunction)
/**