Skip to main content
FW version: Stable

Beeping

The controller can beep using the motor or even play melodies. Usually the firmware is reponsible for beeping, but using these comands you can test the beeping or prepare own melody. That can be hardcoded to the firmware later.

play [song]

Usage:

  • In controllers are saved 3 songs. You can play them executing: play 0, play 1or play 2.
  • Play your custom song
  • play - (without an argument) will stop actual beeping.

How to create and play your song

Using the YOS scripting, you can create an array variable.

var song.20 uint8               # Create array variable, this can store 10 notes

set song 8,47,8,48,8,49,8,50 # Fill variable with lenght and notes. (No spaces between numbers)
# Order: lenght 1, note 1, lenght 2, note 2,...

play song # Play the song

Change modulation in song:

Write in song value 255, than the next value is evaulated as modulation

set song 8,47,8,48,255,16,8,50
# Order: lenght 1, note 1, lenght 2, note 2, 255, modulation = DECAY2, lenght3, note3

The modulation is than same until next change.

Change volume in song:

Write in song value 254, than the next value is evaulated as volume. The volume is in range 0-255

set song 8,47,8,48,254,128,8,50
# Order: lenght 1, note 1, lenght 2, note 2, 255, volume is 50%, lenght3, note3

The volume is than same until next change.

beep [note] [lenght] [modulation]

  • note - note (same notes as used in play)
  • lenght - default value is 100 (if not specified)

Notes:

The note value range is 1 - 253.

Here are some basic notes:

NoteNote number
C146+0
C1x46+1
D146+2
D1x46+3
E146+4
F146+5
F1x46+6
G146+7
G1x46+8
A146+9
A1x46+10
H146+11
C246+13

Modulation:

Modulationnumber
DECAY 00
DECAY 116
DECAY 2 (default)32
DECAY 348