wiki:Docs/825gen2/Dev/Devices/Beeper

Beeper

A built-in beeper is provided that beeps when touchscreen buttons are pressed, or based on app control.

The beeper device /dev/cardbeep accepts formatted strings containing various notes to play. The following notes are supported:

NoteOctaveFrequency (Hz)
C5523.25
D5587.33
E5659.26
F5698.46
G5783.99
A5880
B5987.77
C61046.5
E61318.5
G61568
A61760
C72093
D72349.3
E72637

A string can be formatted to send to the device in the format:

<duration><note><octave>
 * duration
  * 1 – 8, note = 1/duration
   * 1 = whole (1/1) note
   * 4 = quarter (1/4) note
   * 8 = eighth (1/8) note
 * note - letter from above table
 * octave - number from above table

Commas are used to separate note information, for example:

4A5,8E6

Plays a 1/4 note A in octave five then a 1/8 note E in octave 6.

The default octave may be set by:

O<octave>

Example:

O5,A,B,C

Sets the default octave to 5 then plays note A, B, and C.

The tempo may be set by:

T<tempo>

tempo must be three characters numeric

Example:

T100,A,B

Sets the tempo to 100 then plays note A and B.

Refer to the lib825ev library PlayNotes function for application beeper output.

Last modified 8 weeks ago Last modified on 09/18/24 15:44:39
Note: See TracWiki for help on using the wiki.