Buzzer, Beeper_status, Off_beeper – Argox PA-20 Programming Guide User Manual

Page 30: On_beeper, Setbuzzervol

Advertising
background image

PT-20 Programming Guide

28

Buzzer

beeper_status

Purpose: To see whether a beeper sequence is under going or not.

Syntax: int beeper_status(void);

Example call: while(beeper_status( ));

Includes:

#include “SDK.h ”

Description: The beeper_status function checks if there is a beeper sequence in

progress.

Returns: 1 if beeper sequence still in progress, 0 otherwise

off_beeper

Purpose: Terminate beeper sequence.

Syntax: void off_beeper(void);

Example call: off_beeper( );

Includes:

#include “SDK.h ”

Description: The off_beeper function terminates beeper sequence immediately if there

is a beeper sequence in progress.

Returns: none

on_beeper

Purpose: Assign a beeper sequence to instruct beeper action.

Syntax: void on_beeper(int *sequence);

Example call: int beep_twice[50] = {30,10,0,10,30,10,0,0};

on_beeper(beep_twice);

Includes:

#include “SDK.h ”

Description: A beep frequency is an integer used to specify the frequency (tone) when

the beeper activates. The actual frequency that the beeper activates is

not the value specified to the beep frequency. It is calculated by the

following formula.

Beep Frequency = 76000 / Actual Frequency Desired

For instance, to get a frequency of 2000Hz, the value of beep frequency

should be 38. If no sound is desired (pause), the beep frequency should

beset to 0. A beep with frequency 0 does not terminate the beeper

sequence. Suitable frequency for the beeper ranges from 1 to 2700Hz,

where peak

at 2000Hz.

Returns: The on_beeper function has no return value.

SetBuzzerVol

Advertising