Hey folks, I am developing a module to enable “interval” training. Which is essentially a timer that counts down your period of maximum effort, followed by a timer to countdown your period of recovery.
I have pretty much everything working how I’d like, except for playing some notes between the periods. I’d like a series of short beeps followed by a longer beep at the switch point (kind of like “bip, bip, bip, beeeep”). I have the “bip” parts done by using
note shortbeep[] = {0x2588, 0x000F};
but when I try to make a longer note nothing seems to happen. From buzzer.h it appears that the least significant 10 bits are the duration in ms, so I have tried
note longbeep[] = {0x25FF, 0x000F};
however, this makes no sound L
Does anyone have any ideas as to what I may have to do to get a longer beep?
Looking at the code (instead of the documentation) it appears that LSB and MSB are backwards.
So my two beeps are
static note shortbeep[] = {0x7088, 0x000F};
static note longbeep[] = {0xFA08, 0x000F};
however…
switch(current)
{
case 3:
case 2:
case 1:
//beep
buzzer_play(shortbeep);
break;
case 0:
buzzer_play(longbeep);
break;
}
Makes 4 beeps the same, instead of the expected 3 short beeps and one long beep.
Any ideas?
--
You received this message because you are subscribed to the Google Groups "OpenChronos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openchronos...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.