summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang (Wolle) Ewald <wolfgang.ewald@wolles-elektronikkiste.de>2020-07-30 15:10:52 +0200
committerGitHub <noreply@github.com>2020-07-30 15:10:52 +0200
commit9c33be6b3f7bc469220bee0d66694594c227eeb8 (patch)
tree8bffbfe631652f9f6f29eb019888a6c452655b51
parentMerge pull request #5 from martinbra/patch-1 (diff)
parentupdating keywords for missing enum types. (diff)
downloadADS1115_WE-9c33be6b3f7bc469220bee0d66694594c227eeb8.tar
ADS1115_WE-9c33be6b3f7bc469220bee0d66694594c227eeb8.tar.gz
ADS1115_WE-9c33be6b3f7bc469220bee0d66694594c227eeb8.tar.bz2
ADS1115_WE-9c33be6b3f7bc469220bee0d66694594c227eeb8.tar.lz
ADS1115_WE-9c33be6b3f7bc469220bee0d66694594c227eeb8.tar.xz
ADS1115_WE-9c33be6b3f7bc469220bee0d66694594c227eeb8.tar.zst
ADS1115_WE-9c33be6b3f7bc469220bee0d66694594c227eeb8.zip
-rw-r--r--.travis.yml2
-rw-r--r--examples/Alert_Window_Mode/Alert_Window_Mode.ino10
-rw-r--r--examples/Alert_Window_Mode_with_Latch/Alert_Window_Mode_with_Latch.ino8
-rw-r--r--examples/Continuous/Continuous.ino (renamed from examples/Continous/Continous.ino)258
-rw-r--r--examples/Single_Shot/Single_Shot.ino10
-rw-r--r--examples/Single_Shot_Conv_Ready_Alert_Controlled/Single_Shot_Conv_Ready_Alert_Controlled.ino8
-rw-r--r--examples/Single_Shot_Conv_Ready_Controlled/Single_Shot_Conv_Ready_Controlled.ino10
-rw-r--r--keywords.txt91
-rw-r--r--src/ADS1115_WE.h11
9 files changed, 250 insertions, 158 deletions
diff --git a/.travis.yml b/.travis.yml
index aa1001a..21a9ca6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,7 +32,7 @@ cache:
env:
- PLATFORMIO_CI_SRC=examples/Single_Shot/Single_Shot.ino
- - PLATFORMIO_CI_SRC=examples/Continous/Continous.ino
+ - PLATFORMIO_CI_SRC=examples/Continuous/Continuous.ino
- PLATFORMIO_CI_SRC=examples/Alert_Window_Mode/Alert_Window_Mode.ino
install:
diff --git a/examples/Alert_Window_Mode/Alert_Window_Mode.ino b/examples/Alert_Window_Mode/Alert_Window_Mode.ino
index 3be5dec..a68b684 100644
--- a/examples/Alert_Window_Mode/Alert_Window_Mode.ino
+++ b/examples/Alert_Window_Mode/Alert_Window_Mode.ino
@@ -81,14 +81,14 @@ void setup() {
*/
//adc.setConvRate(ADS1115_8_SPS); //uncomment if you want to change the default
- /* Set continous or single shot mode:
+ /* Set continuous or single shot mode:
*
- * ADS1115_CONTINOUS -> continous mode
- * ADS1115_SINGLE -> single shot mode (default)
+ * ADS1115_CONTINUOUS -> continuous mode
+ * ADS1115_SINGLE -> single shot mode (default)
*/
- adc.setMeasureMode(ADS1115_CONTINOUS); //comment or change you want to change to single shot
+ adc.setMeasureMode(ADS1115_CONTINUOUS); //comment or change you want to change to single shot
- /* Choose maximum limit or maxium and minimum alert limit (window)in Volt - alert pin will
+ /* Choose maximum limit or maximum and minimum alert limit (window)in Volt - alert pin will
* be active when measured values are beyond the maximum limit or outside the window
* Upper limit first: setAlertLimit_V(MODE, maximum, minimum)
* In max limit mode the minimum value is the limit where the alert pin will be deactivated
diff --git a/examples/Alert_Window_Mode_with_Latch/Alert_Window_Mode_with_Latch.ino b/examples/Alert_Window_Mode_with_Latch/Alert_Window_Mode_with_Latch.ino
index 049a65f..f90d6db 100644
--- a/examples/Alert_Window_Mode_with_Latch/Alert_Window_Mode_with_Latch.ino
+++ b/examples/Alert_Window_Mode_with_Latch/Alert_Window_Mode_with_Latch.ino
@@ -83,14 +83,14 @@ void setup() {
*/
//adc.setConvRate(ADS1115_8_SPS); //uncomment if you want to change the default
- /* Set continous or single shot mode:
+ /* Set continuous or single shot mode:
*
- * ADS1115_CONTINOUS -> continous mode
+ * ADS1115_CONTINUOUS -> continuous mode
* ADS1115_SINGLE -> single shot mode (default)
*/
- adc.setMeasureMode(ADS1115_CONTINOUS); //comment or change if you want to change single shot
+ adc.setMeasureMode(ADS1115_CONTINUOUS); //comment or change if you want to change single shot
- /* Choose maximum limit or maxium and minimum alert limit (window)in Volt - alert pin will
+ /* Choose maximum limit or maximum and minimum alert limit (window)in Volt - alert pin will
* be active when measured values are beyond the maximum limit or outside the window
* Upper limit first: setAlertLimit_V(MODE, maximum, minimum)
* In max limit mode the minimum value is the limit where the alert pin will be deactivated
diff --git a/examples/Continous/Continous.ino b/examples/Continuous/Continuous.ino
index bece321..3c8313a 100644
--- a/examples/Continous/Continous.ino
+++ b/examples/Continuous/Continuous.ino
@@ -1,129 +1,129 @@
-/***************************************************************************
-* Example sketch for the ADS1115_WE library
-*
-* This sketch shows how to use the ADS1115 in continous mode.
-*
-* Further information can be found on:
-* https://wolles-elektronikkiste.de/ads1115
-*
-***************************************************************************/
-
-#include<ADS1115_WE.h>
-#include<Wire.h>
-#define I2C_ADDRESS 0x48
-
-ADS1115_WE adc(I2C_ADDRESS);
-// ADS1115_WE adc = ADS1115_WE(); // Alternative: uses default address 0x48
-
-void setup() {
- Wire.begin();
- Serial.begin(9600);
- if(!adc.init()){
- Serial.println("ADS1115 not connected!");
- }
-
- /* Set the voltage range of the ADC to adjust the gain
- * Please note that you must not apply more than VDD + 0.3V to the input pins!
- *
- * ADS1115_RANGE_6144 -> +/- 6144 mV
- * ADS1115_RANGE_4096 -> +/- 4096 mV
- * ADS1115_RANGE_2048 -> +/- 2048 mV (default)
- * ADS1115_RANGE_1024 -> +/- 1024 mV
- * ADS1115_RANGE_0512 -> +/- 512 mV
- * ADS1115_RANGE_0256 -> +/- 256 mV
- */
- adc.setVoltageRange_mV(ADS1115_RANGE_6144); //comment line/change parameter to change range
-
- /* Set the inputs to be compared
- *
- * ADS1115_COMP_0_1 -> compares 0 with 1 (default)
- * ADS1115_COMP_0_3 -> compares 0 with 3
- * ADS1115_COMP_1_3 -> compares 1 with 3
- * ADS1115_COMP_2_3 -> compares 2 with 3
- * ADS1115_COMP_0_GND -> compares 0 with GND
- * ADS1115_COMP_1_GND -> compares 1 with GND
- * ADS1115_COMP_2_GND -> compares 2 with GND
- * ADS1115_COMP_3_GND -> compares 3 with GND
- */
- adc.setCompareChannels(ADS1115_COMP_0_GND); //comment line/change parameter to change channel
-
- /* Set number of conversions after which the alert pin will be active
- * - or you can disable the alert
- *
- * ADS1115_ASSERT_AFTER_1 -> after 1 conversion
- * ADS1115_ASSERT_AFTER_2 -> after 2 conversions
- * ADS1115_ASSERT_AFTER_4 -> after 4 conversions
- * ADS1115_DISABLE_ALERT -> disable comparator / alert pin (default)
- */
- //adc.setAlertPinMode(ADS1115_ASSERT_AFTER_1); //uncomment if you want to change the default
-
- /* Set the conversion rate in SPS (samples per second)
- * Options should be self-explaining:
- *
- * ADS1115_8_SPS
- * ADS1115_16_SPS
- * ADS1115_32_SPS
- * ADS1115_64_SPS
- * ADS1115_128_SPS (default)
- * ADS1115_250_SPS
- * ADS1115_475_SPS
- * ADS1115_860_SPS
- */
- // adc.setConvRate(ADS1115_8_SPS); //uncomment if you want to change the default
-
- /* Set continous or single shot mode:
- *
- * ADS1115_CONTINOUS -> continous mode
- * ADS1115_SINGLE -> single shot mode (default)
- */
- adc.setMeasureMode(ADS1115_CONTINOUS); //comment line/change parameter to change mode
-
- /* Choose maximum limit or maxium and minimum alert limit (window)in Volt - alert pin will
- * be active when measured values are beyond the maximum limit or outside the window
- * Upper limit first: setAlertLimit_V(MODE, maximum, minimum)
- * In max limit mode the minimum value is the limit where the alert pin will be deactivated (if
- * not latched)
- *
- * ADS1115_MAX_LIMIT
- * ADS1115_WINDOW
- *
- */
- //adc.setAlertModeAndLimit_V(ADS1115_MAX_LIMIT, 3.0, 1.5); //uncomment if you want to change the default
-
- /* Enable or disable latch. If latch is enabled the alarm pin will be active until the
- * conversion register is read (getResult functions). If disabled the alarm pin will be
- * deactivated with next value within limits.
- *
- * ADS1115_LATCH_DISABLED (default)
- * ADS1115_LATCH_ENABLED
- */
- //adc.setAlertLatch(ADS1115_LATCH_ENABLED); //uncomment if you want to change the default
-
- /* Sets the alert pin polarity if active:
- *
- * Enable or disable latch. If latch is enabled the alarm pin will be active until the
- * conversion register is read (getResult functions). If disabled the alarm pin will be
- * deactivated with next value within limits.
- *
- * ADS1115_ACT_LOW -> active low (default)
- * ADS1115_ACT_HIGH -> active high
- */
- //adc.setAlertPol(ADS1115_ACT_LOW); //uncomment if you want to change the default
-
- /* With this function the alert pin will be active, when a conversion is ready.
- * In order to deactivate, use the setAlertLimit_V function
- */
- //adc.setAlertPinToConversionReady(); //uncomment if you want to change the default
-
- Serial.println("ADS1115 Example Sketch - Continous Mode");
- Serial.println();
-}
-
-void loop() {
- float voltage = 0.0;
- voltage = adc.getResult_V(); // alternative: getResult_mV for Millivolt
- Serial.print("Channel 0 vs GND [V]: ");
- Serial.println(voltage);
- Serial.println("-------------------------------");
- delay(2000);
-}
+/***************************************************************************
+* Example sketch for the ADS1115_WE library
+*
+* This sketch shows how to use the ADS1115 in continuous mode.
+*
+* Further information can be found on:
+* https://wolles-elektronikkiste.de/ads1115
+*
+***************************************************************************/
+
+#include<ADS1115_WE.h>
+#include<Wire.h>
+#define I2C_ADDRESS 0x48
+
+ADS1115_WE adc(I2C_ADDRESS);
+// ADS1115_WE adc = ADS1115_WE(); // Alternative: uses default address 0x48
+
+void setup() {
+ Wire.begin();
+ Serial.begin(9600);
+ if(!adc.init()){
+ Serial.println("ADS1115 not connected!");
+ }
+
+ /* Set the voltage range of the ADC to adjust the gain
+ * Please note that you must not apply more than VDD + 0.3V to the input pins!
+ *
+ * ADS1115_RANGE_6144 -> +/- 6144 mV
+ * ADS1115_RANGE_4096 -> +/- 4096 mV
+ * ADS1115_RANGE_2048 -> +/- 2048 mV (default)
+ * ADS1115_RANGE_1024 -> +/- 1024 mV
+ * ADS1115_RANGE_0512 -> +/- 512 mV
+ * ADS1115_RANGE_0256 -> +/- 256 mV
+ */
+ adc.setVoltageRange_mV(ADS1115_RANGE_6144); //comment line/change parameter to change range
+
+ /* Set the inputs to be compared
+ *
+ * ADS1115_COMP_0_1 -> compares 0 with 1 (default)
+ * ADS1115_COMP_0_3 -> compares 0 with 3
+ * ADS1115_COMP_1_3 -> compares 1 with 3
+ * ADS1115_COMP_2_3 -> compares 2 with 3
+ * ADS1115_COMP_0_GND -> compares 0 with GND
+ * ADS1115_COMP_1_GND -> compares 1 with GND
+ * ADS1115_COMP_2_GND -> compares 2 with GND
+ * ADS1115_COMP_3_GND -> compares 3 with GND
+ */
+ adc.setCompareChannels(ADS1115_COMP_0_GND); //comment line/change parameter to change channel
+
+ /* Set number of conversions after which the alert pin will be active
+ * - or you can disable the alert
+ *
+ * ADS1115_ASSERT_AFTER_1 -> after 1 conversion
+ * ADS1115_ASSERT_AFTER_2 -> after 2 conversions
+ * ADS1115_ASSERT_AFTER_4 -> after 4 conversions
+ * ADS1115_DISABLE_ALERT -> disable comparator / alert pin (default)
+ */
+ //adc.setAlertPinMode(ADS1115_ASSERT_AFTER_1); //uncomment if you want to change the default
+
+ /* Set the conversion rate in SPS (samples per second)
+ * Options should be self-explaining:
+ *
+ * ADS1115_8_SPS
+ * ADS1115_16_SPS
+ * ADS1115_32_SPS
+ * ADS1115_64_SPS
+ * ADS1115_128_SPS (default)
+ * ADS1115_250_SPS
+ * ADS1115_475_SPS
+ * ADS1115_860_SPS
+ */
+ // adc.setConvRate(ADS1115_8_SPS); //uncomment if you want to change the default
+
+ /* Set continuous or single shot mode:
+ *
+ * ADS1115_CONTINUOUS -> continuous mode
+ * ADS1115_SINGLE -> single shot mode (default)
+ */
+ adc.setMeasureMode(ADS1115_CONTINUOUS); //comment line/change parameter to change mode
+
+ /* Choose maximum limit or maximum and minimum alert limit (window)in Volt - alert pin will
+ * be active when measured values are beyond the maximum limit or outside the window
+ * Upper limit first: setAlertLimit_V(MODE, maximum, minimum)
+ * In max limit mode the minimum value is the limit where the alert pin will be deactivated (if
+ * not latched)
+ *
+ * ADS1115_MAX_LIMIT
+ * ADS1115_WINDOW
+ *
+ */
+ //adc.setAlertModeAndLimit_V(ADS1115_MAX_LIMIT, 3.0, 1.5); //uncomment if you want to change the default
+
+ /* Enable or disable latch. If latch is enabled the alarm pin will be active until the
+ * conversion register is read (getResult functions). If disabled the alarm pin will be
+ * deactivated with next value within limits.
+ *
+ * ADS1115_LATCH_DISABLED (default)
+ * ADS1115_LATCH_ENABLED
+ */
+ //adc.setAlertLatch(ADS1115_LATCH_ENABLED); //uncomment if you want to change the default
+
+ /* Sets the alert pin polarity if active:
+ *
+ * Enable or disable latch. If latch is enabled the alarm pin will be active until the
+ * conversion register is read (getResult functions). If disabled the alarm pin will be
+ * deactivated with next value within limits.
+ *
+ * ADS1115_ACT_LOW -> active low (default)
+ * ADS1115_ACT_HIGH -> active high
+ */
+ //adc.setAlertPol(ADS1115_ACT_LOW); //uncomment if you want to change the default
+
+ /* With this function the alert pin will be active, when a conversion is ready.
+ * In order to deactivate, use the setAlertLimit_V function
+ */
+ //adc.setAlertPinToConversionReady(); //uncomment if you want to change the default
+
+ Serial.println("ADS1115 Example Sketch - Continuous Mode");
+ Serial.println();
+}
+
+void loop() {
+ float voltage = 0.0;
+ voltage = adc.getResult_V(); // alternative: getResult_mV for Millivolt
+ Serial.print("Channel 0 vs GND [V]: ");
+ Serial.println(voltage);
+ Serial.println("-------------------------------");
+ delay(2000);
+}
diff --git a/examples/Single_Shot/Single_Shot.ino b/examples/Single_Shot/Single_Shot.ino
index 8a5a198..3b583b2 100644
--- a/examples/Single_Shot/Single_Shot.ino
+++ b/examples/Single_Shot/Single_Shot.ino
@@ -32,7 +32,7 @@ void setup() {
* ADS1115_RANGE_0512 -> +/- 512 mV
* ADS1115_RANGE_0256 -> +/- 256 mV
*/
- adc.setVoltageRange_mV(ADS1115_RANGE_6144); //comment line/change paramater to change range
+ adc.setVoltageRange_mV(ADS1115_RANGE_6144); //comment line/change parameter to change range
/* Set the inputs to be compared
*
@@ -71,14 +71,14 @@ void setup() {
*/
//adc.setConvRate(ADS1115_128_SPS); //uncomment if you want to change the default
- /* Set continous or single shot mode:
+ /* Set continuous or single shot mode:
*
- * ADS1115_CONTINOUS -> continous mode
+ * ADS1115_CONTINUOUS -> continuous mode
* ADS1115_SINGLE -> single shot mode (default)
*/
- //adc.setMeasureMode(ADS1115_CONTINOUS); //uncomment if you want to change the default
+ //adc.setMeasureMode(ADS1115_CONTINUOUS); //uncomment if you want to change the default
- /* Choose maximum limit or maxium and minimum alert limit (window)in Volt - alert pin will
+ /* Choose maximum limit or maximum and minimum alert limit (window)in Volt - alert pin will
* be active when measured values are beyond the maximum limit or outside the window
* Upper limit first: setAlertLimit_V(MODE, maximum, minimum)
* In max limit mode the minimum value is the limit where the alert pin will be deactivated (if
diff --git a/examples/Single_Shot_Conv_Ready_Alert_Controlled/Single_Shot_Conv_Ready_Alert_Controlled.ino b/examples/Single_Shot_Conv_Ready_Alert_Controlled/Single_Shot_Conv_Ready_Alert_Controlled.ino
index a02067a..5822f01 100644
--- a/examples/Single_Shot_Conv_Ready_Alert_Controlled/Single_Shot_Conv_Ready_Alert_Controlled.ino
+++ b/examples/Single_Shot_Conv_Ready_Alert_Controlled/Single_Shot_Conv_Ready_Alert_Controlled.ino
@@ -76,14 +76,14 @@ void setup() {
*/
adc.setConvRate(ADS1115_8_SPS); //comment line/change parameter to change SPS
- /* Set continous or single shot mode:
+ /* Set continuous or single shot mode:
*
- * ADS1115_CONTINOUS -> continous mode
+ * ADS1115_CONTINUOUS -> continuous mode
* ADS1115_SINGLE -> single shot mode (default)
*/
- //adc.setMeasureMode(ADS1115_CONTINOUS); // continous mode does not work with conversion ready
+ //adc.setMeasureMode(ADS1115_CONTINUOUS); // continuous mode does not work with conversion ready
- /* Choose maximum limit or maxium and minimum alert limit (window)in Volt - alert pin will
+ /* Choose maximum limit or maximum and minimum alert limit (window)in Volt - alert pin will
* be active when measured values are beyond the maximum limit or outside the window
* Upper limit first: setAlertLimit_V(MODE, maximum, minimum)
* In max limit mode the minimum value is the limit where the alert pin will be deactivated (if
diff --git a/examples/Single_Shot_Conv_Ready_Controlled/Single_Shot_Conv_Ready_Controlled.ino b/examples/Single_Shot_Conv_Ready_Controlled/Single_Shot_Conv_Ready_Controlled.ino
index 976e682..9ca409e 100644
--- a/examples/Single_Shot_Conv_Ready_Controlled/Single_Shot_Conv_Ready_Controlled.ino
+++ b/examples/Single_Shot_Conv_Ready_Controlled/Single_Shot_Conv_Ready_Controlled.ino
@@ -2,7 +2,7 @@
* Example sketch for the ADS1115_WE library
*
* This sketch shows how you can use the conversion ready bit with the isBusy function.
-* This does not work in the continous mode.
+* This does not work in the continuous mode.
*
* Further information can be found on:
* https://wolles-elektronikkiste.de/ads1115
@@ -72,14 +72,14 @@ void setup() {
*/
adc.setConvRate(ADS1115_8_SPS); //comment line/change parameter to change SPS
- /* Set continous or single shot mode:
+ /* Set continuous or single shot mode:
*
- * ADS1115_CONTINOUS -> continous mode
+ * ADS1115_CONTINUOUS -> continuous mode
* ADS1115_SINGLE -> single shot mode (default)
*/
- //adc.setMeasureMode(ADS1115_CONTINOUS); //continous mode does not work with conversion ready (isBusy)
+ //adc.setMeasureMode(ADS1115_CONTINUOUS); //continuous mode does not work with conversion ready (isBusy)
- /* Choose maximum limit or maxium and minimum alert limit (window)in Volt - alert pin will
+ /* Choose maximum limit or maximum and minimum alert limit (window)in Volt - alert pin will
* be active when measured values are beyond the maximum limit or outside the window
* Upper limit first: setAlertLimit_V(MODE, maximum, minimum)
* In max limit mode the minimum value is the limit where the alert pin will be deactivated (if
diff --git a/keywords.txt b/keywords.txt
new file mode 100644
index 0000000..8e76357
--- /dev/null
+++ b/keywords.txt
@@ -0,0 +1,91 @@
+#######################################
+# Syntax Coloring Map For ADS1115_WE
+#######################################
+
+#######################################
+# Datatypes (KEYWORD1)
+#######################################
+
+ADS1115_WE KEYWORD1
+
+# ENUM TYPES
+ADS1115_COMP_QUE KEYWORD1
+ADS1115_LATCH KEYWORD1
+ADS1115_ALERT_POL KEYWORD1
+ADS1115_COMP_MODE KEYWORD1
+ADS1115_CONV_RATE KEYWORD1
+ADS1115_MEASURE_MODE KEYWORD1
+ADS1115_RANGE KEYWORD1
+ADS1115_MUX KEYWORD1
+ADS1115_STATUS_OR_START KEYWORD1
+
+
+#######################################
+# Methods and Functions (KEYWORD2)
+#######################################
+
+reset KEYWORD2
+init KEYWORD2
+setAlertPinMode KEYWORD2
+setAlertLatch KEYWORD2
+setAlertPol KEYWORD2
+setAlertModeAndLimit_V KEYWORD2
+setConvRate KEYWORD2
+setMeasureMode KEYWORD2
+setVoltageRange_mV KEYWORD2
+setCompareChannels KEYWORD2
+isBusy KEYWORD2
+startSingleMeasurement KEYWORD2
+getResult_V KEYWORD2
+getResult_mV KEYWORD2
+setAlertPinToConversionReady KEYWORD2
+clearAlert KEYWORD2
+
+#######################################
+# Constants (LITERAL1)
+#######################################
+ADS1115_CONV_REG LITERAL1
+ADS1115_CONFIG_REG LITERAL1
+ADS1115_LO_THRESH_REG LITERAL1
+ADS1115_HI_THRESH_REG LITERAL1
+ADS1115_REG_FACTOR LITERAL1
+ADS1115_REG_RESET_VAL LITERAL1
+
+# ENUM VALUES
+ADS1115_ASSERT_AFTER_1 LITERAL1
+ADS1115_ASSERT_AFTER_2 LITERAL1
+ADS1115_ASSERT_AFTER_4 LITERAL1
+ADS1115_DISABLE_ALERT LITERAL1
+ADS1115_LATCH_DISABLED LITERAL1
+ADS1115_LATCH_ENABLED LITERAL1
+ADS1115_ACT_LOW LITERAL1
+ADS1115_ACT_HIGH LITERAL1
+ADS1115_MAX_LIMIT LITERAL1
+ADS1115_WINDOW LITERAL1
+ADS1115_8_SPS LITERAL1
+ADS1115_16_SPS LITERAL1
+ADS1115_32_SPS LITERAL1
+ADS1115_64_SPS LITERAL1
+ADS1115_128_SPS LITERAL1
+ADS1115_250_SPS LITERAL1
+ADS1115_475_SPS LITERAL1
+ADS1115_860_SPS LITERAL1
+ADS1115_CONTINUOUS LITERAL1
+ADS1115_CONTINOUS LITERAL1
+ADS1115_SINGLE LITERAL1
+ADS1115_RANGE_6144 LITERAL1
+ADS1115_RANGE_4096 LITERAL1
+ADS1115_RANGE_2048 LITERAL1
+ADS1115_RANGE_1024 LITERAL1
+ADS1115_RANGE_0512 LITERAL1
+ADS1115_RANGE_0256 LITERAL1
+ADS1115_COMP_0_1 LITERAL1
+ADS1115_COMP_0_3 LITERAL1
+ADS1115_COMP_1_3 LITERAL1
+ADS1115_COMP_2_3 LITERAL1
+ADS1115_COMP_0_GND LITERAL1
+ADS1115_COMP_1_GND LITERAL1
+ADS1115_COMP_2_GND LITERAL1
+ADS1115_COMP_3_GND LITERAL1
+ADS1115_BUSY LITERAL1
+ADS1115_START_ISREADY LITERAL1 \ No newline at end of file
diff --git a/src/ADS1115_WE.h b/src/ADS1115_WE.h
index c5a269a..c531368 100644
--- a/src/ADS1115_WE.h
+++ b/src/ADS1115_WE.h
@@ -70,8 +70,9 @@ typedef enum ADS1115_CONV_RATE{
} convRate;
typedef enum ADS1115_MEASURE_MODE{
- ADS1115_CONTINOUS = 0x0000,
- ADS1115_SINGLE = 0x0100
+ ADS1115_CONTINOUS = 0x0000, // keeping misspelled enum for backwards compatibility.
+ ADS1115_CONTINUOUS = 0x0000,
+ ADS1115_SINGLE = 0x0100
} measureMode;
typedef enum ADS1115_RANGE{
@@ -139,7 +140,7 @@ public:
*/
void setAlertPol(ADS1115_ALERT_POL polarity);
- /* Choose maximum limit or maxium and minimum alert limit (window)in Volt - alert pin will
+ /* Choose maximum limit or maximum and minimum alert limit (window)in Volt - alert pin will
* be active when measured values are beyond the maximum limit or outside the window
* Upper limit first: setAlertLimit_V(MODE, maximum, minimum)
* In max limit mode the minimum value is the limit where the alert pin will be deactivated (if
@@ -164,9 +165,9 @@ public:
*/
void setConvRate(ADS1115_CONV_RATE rate);
- /* Set continous or single shot mode:
+ /* Set continuous or single shot mode:
*
- * ADS1115_CONTINOUS -> continous mode
+ * ADS1115_CONTINUOUS -> continuous mode
* ADS1115_SINGLE -> single shot mode (default)
*/
void setMeasureMode(ADS1115_MEASURE_MODE mode);