hm, does not match. ads.setGain is waiting for name of an constant, that is defined in ccp
'{
' GAIN_TWOTHIRDS = ADS1015_REG_CONFIG_PGA_6_144V,
' GAIN_ONE = ADS1015_REG_CONFIG_PGA_4_096V,
' GAIN_TWO = ADS1015_REG_CONFIG_PGA_2_048V,
' GAIN_FOUR = ADS1015_REG_CONFIG_PGA_1_024V,
' GAIN_EIGHT = ADS1015_REG_CONFIG_PGA_0_512V,
' GAIN_SIXTEEN = ADS1015_REG_CONFIG_PGA_0_256V
'} adsGain_t;
so ads.setGain(GAIN_TWOTHIRDS); works, but not ads.setGain((int)o);
makes error:
initializing argument 1 of 'void Adafruit_ADS1015::setGain(adsGain_t)' [-fpermissive]
void setGain(adsGain_t gain);
^
exit status 1
.. or did I understand it wrong?