Metrologic Optimus S Programming Manual page 74

"c" programming guide
Table of Contents

Advertisement

68
"C" Programming Guide For Optimus S/R
play
If there is a beeper sequence already in progress, the later will override the
original one.
Return
None
See Also
beeper_status, off_beeper, play
Purpose
To play melody by specifying a sequence of how a beeper is activated.
void play (const char *sequence);
Syntax
char *sequence;
Example
const char song[ ]={0x31,10,0x32,10,0x33,10,0x34,10,
play(song);
Description
This routine is similar to on_beeper(). However, the frequency character is
specified as:
Bit 7
Reserved
Return
None
See Also
beeper_status, off_beeper, on_beeper
/* pointer to a buffer where a melody sequence resides */
0x35,10,0x36,10,0x37,10,0x41,10,
0x31,4,0x32,4,0x33,4,0x34,4,
0x35,4,0x36,4,0x37,4,0x41,4,0x00,0x00};
6
5
4
3
Frequency for A (La)
# key
Scale
000: Reserved
0: disable
001(1): 55 Hz
1: enable
010(2): 110 Hz
011(3): 220 Hz
100(4): 440 Hz
101(5): 880 Hz
110(6): 1760 Hz
111(7): 3520 Hz
2
1
0
Musical Scale
000: Reserved
001(1): Do
010(2): Re
011(3): Mi
100(4): Fa
101(5): So
110(6): La
111(7): Ti

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents