Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jcontrol.io
Class Buzzer

    java.lang.Object
      jcontrol.io.Buzzer

All Implemented Interfaces:
  SoundDevice

    public class Buzzer

extends Object
implements SoundDevice

Makes some noise using the buzzer connected to the JControl module. Wrapper for class `PWM`.

Version:
  1.0
Author:
  Helge Böhme
Available on JControl Devices:

  lib (Sticker, PLUI, SmartDisplay)

Constructor Summary
`Buzzer()` Constructs a new Buzzer using the default PWM channel.
`Buzzer(int useChannel)` Constructs a new Buzzer.

Method Summary
`void` | `off()` Turns off the Buzzer.
`void` | `on(int frequency)` Turns on the Buzzer with the specified frequency.
`void` | `on(int frequency, int duration)` Turns on the Buzzer with the specified frequency and duration.

Methods inherited from class java.lang.Object
`clone, equals, notifyAll, wait`

Constructor Detail

### Buzzer

    public Buzzer()

  Constructs a new Buzzer using the default PWM channel.

### Buzzer

    public Buzzer(int useChannel)

  Constructs a new Buzzer.

  Parameters:
    `useChannel` - the PWM channel to use

Method Detail

### off

    public void off()

  Turns off the Buzzer.

  Specified by:
    `off` in interface `SoundDevice`

### on

    public void on(int frequency)

  Turns on the Buzzer with the specified frequency. The noise will last until invoking `off`.

  Specified by:
    `on` in interface `SoundDevice`
  Parameters:
    `frequency` - to use (range 250 ... 32767 Hz)

### on

    public void on(int frequency,
                   int duration)

  Turns on the Buzzer with the specified frequency and duration.

  Specified by:
    `on` in interface `SoundDevice`
  Parameters:
    `frequency` - to use (range 250 ... 32767 Hz)
    `duration` - for the noise (range 1 ... 32767 ms)

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD