arduino / ArduinoCore-avr

The Official Arduino AVR core
https://www.arduino.cc
1.25k stars 1.06k forks source link

new tone functions #560

Closed PapaKarlo787 closed 6 months ago

PapaKarlo787 commented 6 months ago

1) tone(void (*f)(void)) - f is the function, which choose behavior after tone(uint8_t, int, long), for example sets next note 2) auto_tone - automatically switches notes from array in flash. Notes and durations are mixed and after follows code of command (it is on freq after audible range - note1, duratin1, note2, duration2, ... command), for example (1000, 100, 2000, 50, -1) Commands are: -1 - stop playing -2 - repeat