I tried adding the HX711 load cell library to a working existing sketch and it causes a warning. Here is the minimal code that shows the conflict. if i comment out any one, it is fine. the warning message is posted below the code. Can I just ignore this or do i need to remove the "define" in one or more location.
#include <OneWire.h>
#include <Encoder.h>
#include "HX711.h"
void setup() {
}
void loop() {
}
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Encoder/utility/direct_pin_read.h:7:0: warning: "PIN_TO_BASEREG" redefined
#define PIN_TO_BASEREG(pin) (portInputRegister(digitalPinToPort(pin)))
^
In file included from C:\Arduino\my_programs\temp-controller-ss-lcd-one-wire-test-i2c-display_test11\temp-controller-ss-lcd-one-wire-test-i2c-display_test11.ino:2:0:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire/OneWire.h:74:0: note: this is the location of the previous definition
#define PIN_TO_BASEREG(pin) (portOutputRegister(pin))
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Encoder/Encoder.h:41:0,
from C:\Arduino\my_programs\temp-controller-ss-lcd-one-wire-test-i2c-display_test11\temp-controller-ss-lcd-one-wire-test-i2c-display_test11.ino:3:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Encoder/utility/direct_pin_read.h:8:0: warning: "PIN_TO_BITMASK" redefined
#define PIN_TO_BITMASK(pin) (digitalPinToBitMask(pin))
^
In file included from C:\Arduino\my_programs\temp-controller-ss-lcd-one-wire-test-i2c-display_test11\temp-controller-ss-lcd-one-wire-test-i2c-display_test11.ino:2:0:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire/OneWire.h:75:0: note: this is the location of the previous definition
#define PIN_TO_BITMASK(pin) (1)
^
#include <OneWire.h>
#include <Encoder.h>
#include "HX711.h"
void setup() {
}
void loop() {
}
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Encoder/utility/direct_pin_read.h:7:0: warning: "PIN_TO_BASEREG" redefined
#define PIN_TO_BASEREG(pin) (portInputRegister(digitalPinToPort(pin)))
^
In file included from C:\Arduino\my_programs\temp-controller-ss-lcd-one-wire-test-i2c-display_test11\temp-controller-ss-lcd-one-wire-test-i2c-display_test11.ino:2:0:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire/OneWire.h:74:0: note: this is the location of the previous definition
#define PIN_TO_BASEREG(pin) (portOutputRegister(pin))
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Encoder/Encoder.h:41:0,
from C:\Arduino\my_programs\temp-controller-ss-lcd-one-wire-test-i2c-display_test11\temp-controller-ss-lcd-one-wire-test-i2c-display_test11.ino:3:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Encoder/utility/direct_pin_read.h:8:0: warning: "PIN_TO_BITMASK" redefined
#define PIN_TO_BITMASK(pin) (digitalPinToBitMask(pin))
^
In file included from C:\Arduino\my_programs\temp-controller-ss-lcd-one-wire-test-i2c-display_test11\temp-controller-ss-lcd-one-wire-test-i2c-display_test11.ino:2:0:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire/OneWire.h:75:0: note: this is the location of the previous definition
#define PIN_TO_BITMASK(pin) (1)
^