Добрый день! Подключал модуль ADS1115 к Nano, работает отлично. А с Wemos d1 mini сначала показания в порт выводились, потом при подаче сигнала на один из каналов модуля ADS1115 в порт начало выдаваться такое:
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
���Hello!
Single-ended readings from AIN0 with >3.0V comparator
ADC Range: +/- 6.144V (1 bit = 3mV/ADS1015, 0.1875mV/ADS1115)
Comparator Threshold: 1000 (3.000V)
Failed to initialize ADS.
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Soft WDT reset
Exception (4):
epc1=0x40201099 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
>>>stack>>>
ctx: cont
sp: 3ffffe50 end: 3fffffd0 offset: 0160
3fffffb0: feefeffe 00000000 3ffee760 402020f4
3fffffc0: feefeffe feefeffe 3fffdab0 40100f91
<<<stack<<<
скетч из примеров библиотеки
#include <Adafruit_ADS1X15.h>
Adafruit_ADS1115 ads; /* Use this for the 16-bit version */
//Adafruit_ADS1015 ads; /* Use this for the 12-bit version */
void setup(void)
{
Serial.begin(9600);
Serial.println("Hello!");
Serial.println("Single-ended readings from AIN0 with >3.0V comparator");
Serial.println("ADC Range: +/- 6.144V (1 bit = 3mV/ADS1015, 0.1875mV/ADS1115)");
Serial.println("Comparator Threshold: 1000 (3.000V)");
// The ADC input range (or gain) can be changed via the following
// functions, but be careful never to exceed VDD +0.3V max, or to
// exceed the upper and lower limits if you adjust the input range!
// Setting these values incorrectly may destroy your ADC!
// ADS1015 ADS1115
// ------- -------
// ads.setGain(GAIN_TWOTHIRDS); // 2/3x gain +/- 6.144V 1 bit = 3mV 0.1875mV (default)
// ads.setGain(GAIN_ONE); // 1x gain +/- 4.096V 1 bit = 2mV 0.125mV
// ads.setGain(GAIN_TWO); // 2x gain +/- 2.048V 1 bit = 1mV 0.0625mV
// ads.setGain(GAIN_FOUR); // 4x gain +/- 1.024V 1 bit = 0.5mV 0.03125mV
// ads.setGain(GAIN_EIGHT); // 8x gain +/- 0.512V 1 bit = 0.25mV 0.015625mV
// ads.setGain(GAIN_SIXTEEN); // 16x gain +/- 0.256V 1 bit = 0.125mV 0.0078125mV
if (!ads.begin()) {
Serial.println("Failed to initialize ADS.");
while (1);
}
// Setup 3V comparator on channel 0
ads.startComparator_SingleEnded(0, 1000);
}
void loop(void)
{
int16_t adc0;
// Comparator will only de-assert after a read
adc0 = ads.getLastConversionResults();
Serial.print("AIN0: "); Serial.println(adc0);
delay(100);
}
декодер не получается установить в Arduino IDE 2.3, может кто-то сталкивался с подобным ?