Compile Error After Updating

Used Arduino 1.6 for years with no issues. Updated to 2.0 and Visual Studio to use Visual Micro; errors everywhere. Abandoned that. So updated to Arduino 1.8.6 and updated Adafruit libraries. Now getting SPI.h error:SPI.h:221:72: error: conversion from 'int' to non-scalar type 'SPIClass::transfer16(uint16_t)::' requested
union { uint16_t val; struct { uint8_t lsb; uint8_t msb; }; } in = 0, out = 0;
This has to do with libraries and not my code. This is similar to error in Visual Studio which declared it as uninitialized variables.
Is there a mismatch of libraries and header files? I cannot even compile code I created a year ago.

The latest AVR SPI.h does not have the "= 0" parts on the 'in' and 'out' variables. Try using Boards Manager (Tools -> Board -> Boards Manger) to see if there is an update available for your AVR board support.

John, you are a friggin genius. I now recall that I changed the SPI.h file when I got uninitialized variables flagged for that line when I was trying to get Visual Studio and Virtual Micro up and running. I removed the offending assignments and voila, it works. Thanks much.

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