HTCC-AB01-V2 and ADS1115 Error

Hello,
using a HTCC-AB01-V2, I try to compile Examples->Sensor-Third Party->ADS1x15->Singleended
but I get some errors (everything works fine compiling whith a wireless stick lite):

  1. I think I need to correct the second line from

#include <Wire.h>
#include <Adafruit_ADS1015.h>

to

#include <Adafruit_ADS1X15.h>

  1. when I try to compile, I get the error:

C:\Users\ xxxx\OneDrive\Documenti\Arduino\libraries\Adafruit_ADS1X15/Adafruit_ADS1X15.h:64:1: error: ‘constexpr’ does not name a type
constexpr uint16_t MUX_BY_CHANNEL[] = {
^
C:\Users\xxxx\OneDrive\Documenti\Arduino\libraries\Adafruit_ADS1X15/Adafruit_ADS1X15.h:64:1: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
exit status 1
Errore durante la compilazione per la scheda CubeCell-Board-V2(HTCC-AB01-V2).

Windows 10
Arduino Ide 1.8.19

Can you help me to fix it?
Many Thanks

Constexpr is available only when comparing new versions. You can try const.

Thank you for your answer.

I try to change the line 64 in C:\Users\xxxx\OneDrive\Documenti\Arduino\libraries\Adafruit_ADS1X15\Adafruit_ADS1X15.h

from constexpr uint16_t MUX_BY_CHANNEL[] = {
to const uint16_t MUX_BY_CHANNEL[] = {

and now I receice a new error:

C:\Users\xxxx\OneDrive\Documenti\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In destructor ‘Adafruit_SPIDevice::~Adafruit_SPIDevice()’:
C:\Users\xxxx\OneDrive\Documenti\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:79:19: error: ‘nullptr’ was not declared in this scope
_spiSetting = nullptr;
^
exit status 1
Errore durante la compilazione per la scheda CubeCell-Board-V2(HTCC-AB01-V2).

I think the problem is in the HTCC-AB01, because with other cards (wireless stick lite, WiFi Lora 32, etc) it works perfectly , without making changes to the library

Try this modification.

I add the:
-std=c++11 in file platform.txt

but i Get this error:

C:\Users\marco\OneDrive\Documenti\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In destructor ‘Adafruit_SPIDevice::~Adafruit_SPIDevice()’:
C:\Users\marco\OneDrive\Documenti\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:79:19: error: ‘nullptr’ was not declared in this scope
_spiSetting = nullptr;
^
exit status 1
Errore durante la compilazione per la scheda CubeCell-Board-V2(HTCC-AB01-V2).

Try another sentence, - std=c++0x

I always get the same error:

C:\Users\marco\OneDrive\Documenti\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In destructor ‘Adafruit_SPIDevice::~Adafruit_SPIDevice()’:
C:\Users\marco\OneDrive\Documenti\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:79:19: error: ‘nullptr’ was not declared in this scope
_spiSetting = nullptr;
^
exit status 1
Errore durante la compilazione per la scheda CubeCell-Board-V2(HTCC-AB01-V2).

Until now I have edited:
line 64 in C:\Users\marco\OneDrive\Documenti\Arduino\libraries\Adafruit_ADS1X15\Adafruit_ADS1X15.h
from constexpr uint16_t MUX_BY_CHANNEL[] = {
to const uint16_t MUX_BY_CHANNEL[] = {

in the file:
line 43 in
C:\Users\marco\AppData\Local\Arduino15\packages\CubeCell\hardware\CubeCell\1.5.0\platform.txt

compiler.S.flags.asr650x=-mcpu=cortex-m0plus -mthumb -c -x assembler-with-cpp -g -w -gdwarf-2 “-I{compiler.sdk.path}/projects/PSoC4” -std=c++10x

Try another sentence, - std=c++0x

I Try the sentences:
-std=c++11
-std=c++0x
- std=c++0x

but I always get the error:

C:\Users\marco\OneDrive\Documenti\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In destructor ‘Adafruit_SPIDevice::~Adafruit_SPIDevice()’:
C:\Users\marco\OneDrive\Documenti\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:79:19: error: ‘nullptr’ was not declared in this scope
_spiSetting = nullptr;
^
exit status 1
Errore durante la compilazione per la scheda CubeCell-Board-V2(HTCC-AB01-V2).

Can someone suggest me any changes ?
Many thanks

On line 79 of Adafruit_SPIDevice.cpp, where you find nullptr, change it to 0 and see if it will compile i.e.
_spiSetting = 0;

Ok, now it works properly.
Many thanks.
:+1:

Adafruit_ADS1X15 2.4.0 does not work, I Tried version 2.3.0 and works Ok.
The new version works fine with AArduino Uno, But get constexpr error when used with Heltec Cubecell AB02. Any efforts to make it compatible yet?