Control LED and buzzer feedback

The VTAP100 has two diagnostic LEDs, red and green, which provide a heartbeat on the board, for factory use only. There are also user feedback LEDs, on the reverse side of the board, which are visible through a window in the case. These can show any hex RGB colour. There is also a buzzer on both VTAP50 and VTAP100. You control how the LEDs and buzzer react to passes, cards or tags by setting parameters including LED or Beep in the config.txt file.

Note: Not all VTAP50 have built in LEDs.

LEDSelect=1 is to make use of the pair of LEDs that are visible through a compact case (CC) for user feedback, but you could use LEDSelect=2 to use the LED that is visible through a square case (SQ) instead. (When driving VTAP50 external LEDs use LEDSelect=0 for external RGB (common cathode), LEDSelect=1 or =2 for external RGB (common anode), or LEDSelect=3 for external or on‑board serial LEDs where fitted.) LEDDefaultRGB=1EEBCF sets the colour that the feedback LED(s) show constantly, but can be set =0 if you would rather LEDs were off when a pass is not being read.

PassLED chooses the hex colour for the LEDs to flash when there is a mobile pass read, along with the flash on time, interval between flashes and number of repeats, the example chooses two 100ms flashes with 100ms intervals in between. TagLED sets the LED response to a card/tag read in the same way. In the example the response to a card/tag is set to be the same colour, but a single 100ms flash (interval between flashes and number of repeats can be omitted if not needed). StartLED is set up in the same way to define an LED action on startup.

PassBeep sets a beep on time, interval between beeps, and a number of repeats for the buzzer when there is a mobile pass read. Buzzer frequency can be changed on hardware from VTAP100 v5 or VTAP50 v2 onwards. More complex beep sequences are discussed in the section Playing beep sequences or tunes below. In this example there will be a double beep for a pass read. TagBeep sets the buzzer response to a card/tag read in the same way and StartBeep is set up in the same way to define a beep on startup. The example sets a single beep response to a card/tag read. (Again you can omit the interval between beeps and number of repeats, for a single beep of the specified duration).

VTAP50 serial LEDs

On VTAP50 v2 boards with firmware from v2.1.11.2, a chain of serial LEDs can be connected to the serial LED connection on the expansion header.

A chain of serial LEDs supports more complex LED options and requires a special text file to control their behaviour, to control the colour of each LED separately and create combinations or sequences of LED patterns.

LEDMaxSerial defines the length of the attached LED chain. The current maximum value for external serial LEDs is 255.
Please contact vtap-support@dotorigin.com if your requirement is for more than 255 LEDs.

Note: Where status LEDs are fitted alongside a chain of serial LEDs, they will duplicate the behaviour of the first two LEDs in the chain.

There is an example leds.ini file at Default leds.ini file [VTAP50 v2 only].

Be aware that, if your requirement is very simple, a small section of the leds.ini file can be included in the config.txt file, to avoid the need for a separate file. For instance:

This example defines a sequence where serial LEDs 1 through 10 in the series show a dark blue (#000010).

Playing beep sequences or tunes

On VTAP100 v5 or VTAP50 v2 hardware onwards, the buzzer frequencies can be changed by specifying a sequence, in a very similar way to specifying sequences for serial LEDs.

A configuration section name and/or file name can follow any of the standard buzzer commands (TagBeep, PassBeep, PassErrorBeep or StartBeep to describe a sequence of beeps.

When a section is specified but no file, it is assumed the beep sequence will be defined in an leds.ini file, potentially alongside serial LED sequence definitions.

If your requirement is very simple it can be defined within the config.txt file, to avoid the need for a separate file. This is shown in the first example below. A more complex beep sequence can be more easily managed in a separate file. The second example uses a text file named beeps.ini, though any short file name could be used (following the xxxxxxxx.xxx format, up to 8 characters with a 3 character optional extension).

This example plays a short 4 note sequence. (Note: If the tagbeep section could not be found, for example if the section name was mistyped, the TagBeep action would default to a single 100ms beep at default frequency, simply ignoring the sequence part of the configuration line.)

Key elements in a note sequence:

  • The repeat is a number of times to play the whole sequence, or use forever to continue until another sequence is started.

  • The tempo sets the beats‑per‑minute (defaults to 100).

  • Each note is played in the order listed. Each one is specificed as note=<duration>,<frequency>,<volume>

    • Duration can be specified as number in milliseconds, or as a fraction of a beat, calculated from the tempo setting, denoted by w (whole), h (half), q (quarter), e (eighth) or s (sixteenth). You can have multiple of the fractional units - so 3h would be a duration equivalent to 3 half notes.

    • Frequency can be specified as number in Hz or as a note name such as C#6 where the note here C is named as a letter, # added for sharp or b for flat, and the number refers to the octave, from 0 to 8 (defaults to 6 if omitted).

      Setting frequency to 0 switches the buzzer off, which can turn a note into a rest of a specified duration.

    • Volume can be set between 0 and 127, though this is not particularly sensitive (defaults to the maximum 127 if omitted).

VTAP can alternatively play very simple MIDI files. It is limited to one channel of a format 0 file, containing a single track. To use a MIDI file, use the section name 'midi' and specify a MIDI file as the file name.