File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
examples/Continuous_ADS1015 Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -124,12 +124,14 @@ void setup() {
124124
125125 /* If you change the compare channels you can immediately read values from the conversion
126126 * register, although they might belong to the former channel if no precautions are taken.
127- * It takes about the time needed for two conversions to get the correct data . In single
128- * shot mode you can use the isBusy() function to wait for data from the new channel. This
129- * does not work in continuous mode.
127+ * It takes up to the time needed for two conversions to get data of the new channel . In single
128+ * shot mode you can use the isBusy() function to wait for fresh data. This does not work in
129+ * continuous mode.
130130 * To solve this issue the library adds a delay after change of channels if you are in contunuous
131131 * mode. The length of the delay is adjusted to the conversion rate. But be aware that the output
132132 * rate will be much lower that the conversion rate if you change channels frequently.
133+ * If you don't want to block the sketch, use setCompareChannels_nonblock() instead of
134+ * setCompareChannels().
133135 */
134136
135137void loop () {
@@ -157,6 +159,7 @@ void loop() {
157159float readChannel (ADS1015_MUX channel) {
158160 float voltage = 0.0 ;
159161 adc.setCompareChannels (channel);
162+ // setCompareChannels_nonblock(channel);
160163 voltage = adc.getResult_V (); // alternative: getResult_mV for Millivolt
161164 return voltage;
162165}
You can’t perform that action at this time.
0 commit comments