lis3dh Library Error Feather M0 Basic Proto

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
MaxD7
 
Posts: 3
Joined: Sun Jul 25, 2021 1:24 am

lis3dh Library Error Feather M0 Basic Proto

Post by MaxD7 »

Working off this tutorial for reference:
https://learn.adafruit.com/animated-led-sand

While uploading tutorial code to Adafruit Feather M0 Basic Proto, I get an error referencing "Adafruit_LIS3DH.cpp:355:35: error: void value not ignored as it ought to be". I uninstalled the library and reinstalled to latest version (1.2.2) with the same error. Uploading the "blink.txt" code for the feather board compiles successfully, and will blink. LIS3DH module has a green LED lit, continuity for the 4 pins are making proper contact to the correct locations. Reinstalled the Arduino IDE to the latest version, same error. No idea what else to try, any ideas?
Attachments
Picture of the board with everything connected.
Picture of the board with everything connected.
FeatherM0.jpg (310.28 KiB) Viewed 79 times
blink_compile.txt
Working, LED blinks
(829 Bytes) Not downloaded yet
led_sand_compile_error.txt
/**
* @brief Enable or disable the Data Ready interupt
*
* @param enable_drdy true to enable the given Data Ready interrupt on INT1,
* false to disable it
* @param int_pin which DRDY interrupt to enable; 1 for DRDY1, 2 for DRDY2
* @return true: success false: failure
*/
bool Adafruit_LIS3DH::enableDRDY(bool enable_drdy, uint8_t int_pin) {
Adafruit_BusIO_Register _ctrl3 = Adafruit_BusIO_Register(
i2c_dev, spi_dev, ADDRBIT8_HIGH_TOREAD, LIS3DH_REG_CTRL3, 1);
Adafruit_BusIO_RegisterBits _drdy1_int_enable =
Adafruit_BusIO_RegisterBits(&_ctrl3, 1, 4);
Adafruit_BusIO_RegisterBits _drdy2_int_enable =
Adafruit_BusIO_RegisterBits(&_ctrl3, 1, 3);

if (int_pin == 1) {
return _drdy1_int_enable.write(enable_drdy);
} else if (int_pin == 2) {
return _drdy2_int_enable.write(enable_drdy);
} else {
return false;

->Location of error in LIS3DH library
(743 Bytes) Not downloaded yet

User avatar
MaxD7
 
Posts: 3
Joined: Sun Jul 25, 2021 1:24 am

Re: lis3dh Library Error Feather M0 Basic Proto

Post by MaxD7 »

Using I2C scanner, can identify both LIS3DH and Charlieplex display.

Scanning...
I2C device found at address 0x18 !
I2C device found at address 0x74 !
done

"Acceldemo" example script that comes with LIS3DH library will output the same error.
Arduino\libraries\Adafruit_LIS3DH\Adafruit_LIS3DH.cpp:355:35: error: void value not ignored as it ought to be
355 | return _drdy2_int_enable.write(enable_drdy);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
exit status 1

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: lis3dh Library Error Feather M0 Basic Proto

Post by adafruit_support_carter »

Weird. Just tried a test build here of that same sketch and target board and not getting that message.

Go through and make sure *all* your libraries are updated to latest.

User avatar
MaxD7
 
Posts: 3
Joined: Sun Jul 25, 2021 1:24 am

Re: lis3dh Library Error Feather M0 Basic Proto

Post by MaxD7 »

Hello,

Thank you! It is working now. I deleted all my libraries, and reinstalled "Adafruit LIS3DH" and "Adafruit IS31FL3731 Charlieplex LED". When installing these two libraries, a text appeared asking me to install the following supporting libraries "Adafruit_BusIO", "Adafruit_GFX_Library", and "Adafruit_Unified_Sensor". My guess would be one of these three libraries had the older version. I really appreciate the help, super cool project as well!

-Max

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: lis3dh Library Error Feather M0 Basic Proto

Post by adafruit_support_carter »

Cool. Glad that fixed it. Yah, the Arduino Lib Manager has support for installing dependencies, but I don't think it takes care of also updating all of those after the initial install. So if you only update one lib, it may get out of sync with its dependencies. Just a guess - but maybe that's what happened here.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”