Ran Katz / Mbed 2 deprecated LightSaber

Dependencies:   L152RE_USBDevice STM32_USB48MHz Watchdog mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LightSaber_sounds.h Source File

LightSaber_sounds.h

00001 #define STARTUP_SOUND       1
00002 #define MOVEMENT_SOUND      2
00003 #define CLASH_SOUND         3
00004 
00005 #define INIT_VOL_IDX        0
00006 #define STEP_VOL_IDX        1
00007 #define INIT_PERIOD_IDX     2
00008 #define STEP_PERIOD_IDX     3
00009 #define STEP_DUR_IDX        4
00010 #define NUM_STEPS_IDX       5
00011 
00012 #define STARTUP_TBL_N_LINES  6
00013 #define MOVEMENT_TBL_N_LINES 4
00014 #define CLASH_TBL_N_LINES 3
00015 
00016 const int startup_sound_table[][6] = {
00017 // initial_volume[%], vollume_step, initial_period[us], period_step, duration[ms], num_of_steps
00018     {50, -5,  20000,  -250, 20,   5},
00019     {25, 0,  18500,  -250, 20,   30},
00020     {25, -5,  11000,  0,    20,   3},
00021     {10, 0,  11000,  0,    100,  1},
00022     {15, 3, 11250,  250,  20,   11},
00023     {50,  0, 14000,  0,    20, 1}
00024     };
00025 
00026 const int movement_sound_table[][6] = {
00027 // initial_volume[%], vollume_step, initial_period[us], period_step, duration[ms], num_of_steps
00028     {25, 0,  14000,  250,  40,   15},
00029     {25, 0,  18000,  -250, 40,   19},
00030     {25, 0,  13000,  250,  40,   4},
00031     {50, 0,  14000,  0,    20, 1}
00032     };
00033     
00034 const int clash_sound_table[][6] = {
00035 // initial_volume[%], vollume_step, initial_period[us], period_step, duration[ms], num_of_steps
00036     {10, 0,  10000,  0,  200,   1},
00037     {10, 2,  10000,  250, 40,   15},
00038     {50, 0,  14000,  0,    20, 1}
00039     };