diff --git a/examples/a_wild_card/a_wild_card.ino b/examples/a_wild_card/a_wild_card.ino index f391f74..ade2fd0 100644 --- a/examples/a_wild_card/a_wild_card.ino +++ b/examples/a_wild_card/a_wild_card.ino @@ -12,7 +12,9 @@ * It requests information about the attached sensor, including its address and * manufacturer info. */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include uint32_t serialBaud = 115200; /*!< The baud rate for the output serial port */ diff --git a/examples/b_address_change/b_address_change.ino b/examples/b_address_change/b_address_change.ino index 3d0e641..63c3a18 100644 --- a/examples/b_address_change/b_address_change.ino +++ b/examples/b_address_change/b_address_change.ino @@ -10,7 +10,9 @@ * This is a simple demonstration of the SDI-12 library for arduino. * It discovers the address of the attached sensor and allows you to change it. */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include uint32_t serialBaud = 57600; /*!< The baud rate for the output serial port */ diff --git a/examples/c_check_all_addresses/c_check_all_addresses.ino b/examples/c_check_all_addresses/c_check_all_addresses.ino index eae5755..47f8dcd 100644 --- a/examples/c_check_all_addresses/c_check_all_addresses.ino +++ b/examples/c_check_all_addresses/c_check_all_addresses.ino @@ -18,7 +18,9 @@ * * To address a sensor, please see Example B: b_address_change.ino */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include uint32_t serialBaud = 115200; /*!< The baud rate for the output serial port */ diff --git a/examples/d_simple_logger/d_simple_logger.ino b/examples/d_simple_logger/d_simple_logger.ino index 8393fb2..037ccce 100644 --- a/examples/d_simple_logger/d_simple_logger.ino +++ b/examples/d_simple_logger/d_simple_logger.ino @@ -22,7 +22,9 @@ * * To address a sensor, please see Example B: b_address_change.ino */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include uint32_t serialBaud = 115200; /*!< The baud rate for the output serial port */ diff --git a/examples/e_continuous_measurement/e_continuous_measurement.ino b/examples/e_continuous_measurement/e_continuous_measurement.ino index f38bc29..0713654 100644 --- a/examples/e_continuous_measurement/e_continuous_measurement.ino +++ b/examples/e_continuous_measurement/e_continuous_measurement.ino @@ -12,7 +12,9 @@ * It discovers the address of all sensors active on a single bus and takes continuous * measurements from them. */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include uint32_t serialBaud = 115200; /*!< The baud rate for the output serial port */ diff --git a/examples/f_basic_data_request/f_basic_data_request.ino b/examples/f_basic_data_request/f_basic_data_request.ino index 129e3a4..8ba8f86 100644 --- a/examples/f_basic_data_request/f_basic_data_request.ino +++ b/examples/f_basic_data_request/f_basic_data_request.ino @@ -13,7 +13,9 @@ * * Edited by Ruben Kertesz for ISCO Nile 502 2/10/2016 */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include /* connection information */ diff --git a/examples/g_terminal_window/g_terminal_window.ino b/examples/g_terminal_window/g_terminal_window.ino index fef0aec..764b359 100644 --- a/examples/g_terminal_window/g_terminal_window.ino +++ b/examples/g_terminal_window/g_terminal_window.ino @@ -15,7 +15,9 @@ * * Edited by Ruben Kertesz for ISCO Nile 502 2/10/2016 */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include uint32_t serialBaud = 115200; /*!< The baud rate for the output serial port */ diff --git a/examples/h_SDI-12_slave_implementation/h_SDI-12_slave_implementation.ino b/examples/h_SDI-12_slave_implementation/h_SDI-12_slave_implementation.ino index 05a3042..28d0965 100644 --- a/examples/h_SDI-12_slave_implementation/h_SDI-12_slave_implementation.ino +++ b/examples/h_SDI-12_slave_implementation/h_SDI-12_slave_implementation.ino @@ -26,7 +26,9 @@ * - Make an int variable for the "number of values to report" instead of the * hard-coded 9s interspersed throughout the code */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include int8_t dataPin = 7; /*!< The pin of the SDI-12 data bus */ diff --git a/examples/i_SDI-12_interface/i_SDI-12_interface.ino b/examples/i_SDI-12_interface/i_SDI-12_interface.ino index 559c544..3af912d 100644 --- a/examples/i_SDI-12_interface/i_SDI-12_interface.ino +++ b/examples/i_SDI-12_interface/i_SDI-12_interface.ino @@ -42,7 +42,9 @@ "fb off : Disable feedback (characters not visible while typing; may be desired " \ "for developers)\r\n" \ "(else) : send command to SDI-12 bus" - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include /* connection information */ diff --git a/examples/k_concurrent_logger/k_concurrent_logger.ino b/examples/k_concurrent_logger/k_concurrent_logger.ino index 983ef0d..edb869e 100644 --- a/examples/k_concurrent_logger/k_concurrent_logger.ino +++ b/examples/k_concurrent_logger/k_concurrent_logger.ino @@ -12,7 +12,9 @@ * until each is finished to query for results. This can be much faster than waiting for * each sensor when you have multiple sensor attached. */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include /* connection information */ diff --git a/examples/l_verify_crc/l_verify_crc.ino b/examples/l_verify_crc/l_verify_crc.ino index 65b8f20..d99a2c3 100644 --- a/examples/l_verify_crc/l_verify_crc.ino +++ b/examples/l_verify_crc/l_verify_crc.ino @@ -9,7 +9,9 @@ * * This example initiates a measurement anc checks the CRC on the returns. */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include /* connection information */ diff --git a/extras/TestCommands/TestCommands.ino b/extras/TestCommands/TestCommands.ino index 0384c3a..7175c61 100644 --- a/extras/TestCommands/TestCommands.ino +++ b/extras/TestCommands/TestCommands.ino @@ -4,7 +4,9 @@ * @license This example is published under the BSD-3 license. * @author Sara Damiano */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include #ifndef SDI12_DATA_PIN diff --git a/extras/TestSensorTiming/TestSensorTiming.ino b/extras/TestSensorTiming/TestSensorTiming.ino index 19cb802..c819f21 100644 --- a/extras/TestSensorTiming/TestSensorTiming.ino +++ b/extras/TestSensorTiming/TestSensorTiming.ino @@ -5,7 +5,9 @@ * @author Sara Damiano * @date March 2024 */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include #ifndef SDI12_DATA_PIN diff --git a/extras/TestWarmUp/TestWarmUp.ino b/extras/TestWarmUp/TestWarmUp.ino index df734ec..097d820 100644 --- a/extras/TestWarmUp/TestWarmUp.ino +++ b/extras/TestWarmUp/TestWarmUp.ino @@ -5,7 +5,9 @@ * @author Sara Damiano * @date March 2021 */ - +#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT) +#include +#endif #include /* connection information */