Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
  • Loading branch information
SRGDamia1 committed Aug 14, 2024
1 parent 65667b3 commit c4feed8
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 14 deletions.
4 changes: 3 additions & 1 deletion examples/a_wild_card/a_wild_card.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

uint32_t serialBaud = 115200; /*!< The baud rate for the output serial port */
Expand Down
4 changes: 3 additions & 1 deletion examples/b_address_change/b_address_change.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

uint32_t serialBaud = 57600; /*!< The baud rate for the output serial port */
Expand Down
4 changes: 3 additions & 1 deletion examples/c_check_all_addresses/c_check_all_addresses.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

uint32_t serialBaud = 115200; /*!< The baud rate for the output serial port */
Expand Down
4 changes: 3 additions & 1 deletion examples/d_simple_logger/d_simple_logger.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

uint32_t serialBaud = 115200; /*!< The baud rate for the output serial port */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

uint32_t serialBaud = 115200; /*!< The baud rate for the output serial port */
Expand Down
4 changes: 3 additions & 1 deletion examples/f_basic_data_request/f_basic_data_request.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

/* connection information */
Expand Down
4 changes: 3 additions & 1 deletion examples/g_terminal_window/g_terminal_window.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

uint32_t serialBaud = 115200; /*!< The baud rate for the output serial port */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

int8_t dataPin = 7; /*!< The pin of the SDI-12 data bus */
Expand Down
4 changes: 3 additions & 1 deletion examples/i_SDI-12_interface/i_SDI-12_interface.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

/* connection information */
Expand Down
4 changes: 3 additions & 1 deletion examples/k_concurrent_logger/k_concurrent_logger.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

/* connection information */
Expand Down
4 changes: 3 additions & 1 deletion examples/l_verify_crc/l_verify_crc.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EnableInterrupt.h>
#endif
#include <SDI12.h>

/* connection information */
Expand Down
4 changes: 3 additions & 1 deletion extras/TestCommands/TestCommands.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* @license This example is published under the BSD-3 license.
* @author Sara Damiano <sdamiano@stroudcenter.org>
*/

#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT)
#include <EnableInterrupt.h>
#endif
#include <SDI12.h>

#ifndef SDI12_DATA_PIN
Expand Down
4 changes: 3 additions & 1 deletion extras/TestSensorTiming/TestSensorTiming.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
* @author Sara Damiano <sdamiano@stroudcenter.org>
* @date March 2024
*/

#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT)
#include <EnableInterrupt.h>
#endif
#include <SDI12.h>

#ifndef SDI12_DATA_PIN
Expand Down
4 changes: 3 additions & 1 deletion extras/TestWarmUp/TestWarmUp.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
* @author Sara Damiano <sdamiano@stroudcenter.org>
* @date March 2021
*/

#if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && not defined(SDI12_INTERNAL_PCINT)
#include <EnableInterrupt.h>
#endif
#include <SDI12.h>

/* connection information */
Expand Down

0 comments on commit c4feed8

Please sign in to comment.