Tone icon indicating copy to clipboard operation
Tone copied to clipboard

Doesn't work with Arduino Nano Every

Open waltribeiro opened this issue 11 months ago • 2 comments

This example code works with the Arduino Uno:

#include <Tone.h>

Tone tone1;

void setup()
{
  tone1.begin(13);
  tone1.play(NOTE_A4);
}

void loop()
{
}

But I get this error below with the Arduino Nano Every (probably because of differences between ATmega328P and the ATmega4809).

Tone.cpp:560:37: error: 'OCIE2A' was not declared in this scope
       returnvalue = (TIMSK2 & (1 << OCIE2A));

Any help?

Screenshot 2024-03-08 at 5 42 30 AM

waltribeiro avatar Mar 08 '24 10:03 waltribeiro

I'd like to see this addition as well - the timers used between the 4809 and the 328 are of course very different, but the Nano Every is a great board and is also cheaper, a lot of universities are using these now instead of the Nano so it would be great to have this library work with it

obwarner1 avatar Apr 19 '24 17:04 obwarner1