Not able to run INA260 software due to imported libraries

While trying to compile software on the Arduino IDE on the METRO 328 (Adafruit Microprocessor), I keep running into this error:

In file included from /home/aliang/sketchbook/libraries/AdafruitBusIO/Adafruit_BusIO_Register.h:2:0,
from /home/aliang/sketchbook/libraries/AdafruitBusIO/Adafruit_I2CRegister.h:1,
from /home/aliang/sketchbook/libraries/AdafruitINA260/Adafruit_INA260.h:22,
from INA260setup.ino:4:
/home/aliang/sketchbook/libraries/AdafruitBusIO/Adafruit_SPIDevice.h:27:3: error: ‘SPISettings’ does not name a type
SPISettings *_spiSetting;

What error is this and how do I fix it?

I'm going to ask you to post the full output. That will provide some additional information that might help us to identify the problem.

Please do this:

  1. When you encounter an error, you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  2. Open a forum reply here by clicking the Reply button.
  3. Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  4. Press Ctrl+V. This will paste the compilation output into the code block.
  5. Move the cursor outside of the code block markup before you add any additional text to your reply.
  6. Click the Reply button to post the output.










In file included from /home/aliang/sketchbook/libraries/AdafruitBusIO/Adafruit_BusIO_Register.h:2:0,
                 from /home/aliang/sketchbook/libraries/AdafruitBusIO/Adafruit_I2CRegister.h:1,
                 from /home/aliang/sketchbook/libraries/AdafruitINA260/Adafruit_INA260.h:22,
                 from INA260setup.ino:4:
/home/aliang/sketchbook/libraries/AdafruitBusIO/Adafruit_SPIDevice.h:27:3: error: ‘SPISettings’ does not name a type
   SPISettings *_spiSetting;
   ^

Are you sure you followed my instructions exactly? There should be more output than that.

The issue is that whenever I use the online Arduino IDE, it will work because the imported libraries will properly be defined and called. However, whenever I try to call these same libraries on my own IDE, the problem comes up in the compilation. And in my IDE, the only output that pops up is only this.

That is unusual.

Please try this:

  1. Select File > Preferences from the Arduino IDE's menus.
  2. Check the box next to "Show verbose output during: [] compilation".
  3. Click the OK button.
  4. Select Sketch > Verify/Compile from the Arduino IDE's menus.
  5. Wait for the compilation to fail.
  6. Click on the black console pane at the bottom of the Arduino IDE window.
  7. Press Ctrl+A to select all the text.
  8. Press Ctrl+C to copy the selected text to the clipboard.
  9. Open a forum reply here by clicking the Reply button.
  10. Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the compilation output is correctly formatted.
    Code block
  11. Press Ctrl+V. This will paste the compilation output into the code block.
  12. Move the cursor outside of the code tags before you add any additional text to your reply.
  13. Click the Reply button to post the output.










/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/SPI -I/usr/share/arduino/libraries/Wire -I/home/aliang/sketchbook/libraries/AdafruitINA260 -I/home/aliang/sketchbook/libraries/AdafruitBusIO /tmp/build2648692130395462360.tmp/INA260setup.cpp -o /tmp/build2648692130395462360.tmp/INA260setup.cpp.o 
In file included from /home/aliang/sketchbook/libraries/AdafruitBusIO/Adafruit_BusIO_Register.h:2:0,
                 from /home/aliang/sketchbook/libraries/AdafruitBusIO/Adafruit_I2CRegister.h:1,
                 from /home/aliang/sketchbook/libraries/AdafruitINA260/Adafruit_INA260.h:22,
                 from INA260setup.ino:4:
/home/aliang/sketchbook/libraries/AdafruitBusIO/Adafruit_SPIDevice.h:27:3: error: ‘SPISettings’ does not name a type
   SPISettings *_spiSetting;
   ^

There's nothing else in the console pane.

Maybe because you're using an old IDE version? Looks like you're using one from a Linix distro package manager and not the 'official' one.

image

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.