AnalogWrite() function not working as expected #132
Replies: 1 comment
-
I am aware of an issue here, this is considered a critical bug and will be my top priority once I resolve two critical issues in the 2.4.0 megaTinyCore release, one of which is solved, one of which is mysterious but which initial investigation suggests the presensce of a missing optimization in both megaTinyCore and DxCore which could bring substantial improvements.. megaTinyCore 2.4.1 needs to be released this weekend. After that is release, #117 is top priority. The fact that you're reporting different behavior for an identical line in different places is a major clue. The core, for some reason, thinks that the PIN_PB1 doesn't refer to a valid pin, which of course it does. The main reason this has gone unresolved for such a ridiculously long time for such a critical problem is that I have believed I was days away from releasing 2.4.0 megaTinyCore since mid july and only was able to release it in the past week, after which I discovered several critical issues. The reason that such a severe bug made it into a release at all is because there is no fucking testing whatsoever beyond what happens by chance during development - the CI testing that is used on megaTinyCore needs to be ported to DxCore and appropriate test sketches written to exercise the basic functionality |
Beta Was this translation helpful? Give feedback.
-
Hello!
I have been using DxCore to program AVR-DA Curiosity Board with Arduino IDE. So far, most things seem to work well, which is such a help and thanks for that.
However, I have been scratching my head for a while but unable to use analogWrite() function. When used inside void loop(), analogWrite(PIN_PB1, 150) gives the following error. But it works if used inside void setup(){}.
error: call to 'badArg' declared with attribute error: badArg("digital I/O function called is constant, but not a valid pin");
Beta Was this translation helpful? Give feedback.
All reactions