void setup()
{
}
void loop()
{
uint32_t now = millis();
static uint32_t past = now;
if ( now - past >= 5 )
{
past = now;
static uint16_t frequency = 440;
tone( 12, frequency );
if ( ( frequency += 25 ) >= 1000 )
{
frequency = 440;
}
}
}