I'm revisiting some code I wrote on 2021 using IDE 1.something in which I have the following
// digitalPinHasPWM() is defined in ~/Arduino/hardware/arduino/avr/variants/standard/pins_arduino.h
// and gets included via Arduino.h (IDE ver 1.00 and up)
if (digitalPinHasPWM(mypin))
{
... etc ...
I'm now on 2.3.3 and this code fails with "'digitalPinHasPWM' was not declared in this scope"
Arduino.h is included. Advice on how to fix greatly appreciated.
What we have here is an ID10T error. I had a DigiSpark board selected (from the last project I was working on), when I switched to the correct board (Pro Mini) it compiles fine. I had thought that board selection was carried in each sketch but I guess not. Anyway problem solved.