Sub Globals
Dim sounds(0)
selected_direction = 1
End Sub
Sub App_Start
Form1.Show
sounds() = Array("N.wav","NNE.wav","NE.wav","ENE.wav", _
"E.wav", "ESE.wav", "SE.wav", "SSE.wav", "S.wav", "SSW.wav", _
"SE.wav", "WSW.wav", "W.wav", "WNW.wav", "NW.wav", "NNW.wav")
timer1.Interval = 300000 ' 1000 ms in second * 60 sec in min * 5 min
timer1.Enabled = True
End Sub
Sub Timer1_Tick
' get the velue of selected_direction
Sound(AppPath & "\sounds\" & sounds(selected_direction))
End Sub
derez. "\sounds\" why must I code like this ?Sound files cannot be stored in an array like images, so you have to call the actual files. name the wav files like the names in the array, or any other names as long as you know which is what, and put them in one directory so they will not mess with the program files.
create a timer and let it tick every 5 minutes (or 15 - you can change the interval from within the program).You can also turn the timer off and on again using the enabled method.
You need to select the direction by your other subs.
B4X:Sub Globals Dim sounds(0) selected_direction = 1 End Sub Sub App_Start Form1.Show sounds() = Array("N.wav","NNE.wav","NE.wav","ENE.wav", _ "E.wav", "ESE.wav", "SE.wav", "SSE.wav", "S.wav", "SSW.wav", _ "SE.wav", "WSW.wav", "W.wav", "WNW.wav", "NW.wav", "NNW.wav") timer1.Interval = 300000 ' 1000 ms in second * 60 sec in min * 5 min timer1.Enabled = True End Sub Sub Timer1_Tick ' get the velue of selected_direction Sound(AppPath & "\sounds\" & sounds(selected_direction)) End Sub
Sounds() = Array("N.wav","NNE.wav","NE.wav","ENE.wav", _
"E.wav", "ESE.wav", "SE.wav", "SSE.wav", "S.wav", "SSW.wav", _
"SE.wav", "WSW.wav", "W.wav", "WNW.wav", "NW.wav", "NNW.wav")/
Sub Globals
Dim sounds(0)
selected_direction = 0
selected_direction = 1
selected_direction = 2
selected_direction = 3
selected_direction = 4
selected_direction = 5
selected_direction = 6
selected_direction = 7
selected_direction = 8
selected_direction = 9
selected_direction = 10
selected_direction = 11
selected_direction = 12
selected_direction = 13
selected_direction = 14
selected_direction = 15
'selected_direction = 16
End Sub
Sub Globals
Dim sounds(0)
selected_direction = 0
[COLOR="Red"]selected_direction = 1
selected_direction = 2
selected_direction = 3
selected_direction = 4
selected_direction = 5
selected_direction = 6
selected_direction = 7
selected_direction = 8
selected_direction = 9
selected_direction = 10
selected_direction = 11
selected_direction = 12
selected_direction = 13
selected_direction = 14
selected_direction = 15
'selected_direction = 16 [/COLOR]End Sub
Sub App_Start
Form1.Show
sounds() = Array("N.wav","NNE.wav","NE.wav","ENE.wav", _
"E.wav", "ESE.wav", "SE.wav", "SSE.wav", "S.wav", "SSW.wav", _
"SE.wav", "WSW.wav", "W.wav", "WNW.wav", "NW.wav", "NNW.wav")
[COLOR="red"]Sounds(0) = "N.wav"
Sounds(1) = "NNE.wav"
Sounds(2) = "NE.wav"
Sounds(3) = "ENE.wav"
Sounds(4) = "E.wav"
Sounds(5) = "ESE.wav"
Sounds(6) = "SE.wav"
Sounds(7) = "SSE.wav"
Sounds(8) = "S.wav"
Sounds(9) = "SSW.wav"
Sounds(10) = "SE.wav"
Sounds(11) = "WSW.wav"
Sounds(12) = "W.wav"
Sounds(13) = "WNW.wav"
Sounds(14) = "NW.wav"
Sounds(15) = "NNW.wav"[/COLOR]
tmrWavFiles.Interval = 300000 ' 1000 ms in second * 60 sec in min * 5 min
tmrWavFiles.Enabled = True
End Sub
Sub tmrWavFiles_Tick
[COLOR="Blue"]' get the velue of selected_direction [/COLOR]
Sound(AppPath & "\sounds\" & sounds(selected_direction))
End Sub
[FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]selected_direction=[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]Int[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2](((GPS1.Header+[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]371.75[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]) [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]Mod [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]360[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])/[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]22.5[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[/SIZE][/FONT]
3. Replaced the GPSDriver.dll with GPSSerial.dll.
Problems:
1. Getting GPSSerial working (pretty darn hard), for me.
I really would like to get GPSLog to work, with the GPSSerial.dll if at all possible
If gps.SeaLevelAltitude <> gps.InvalidData Then AltDatLbl.Text = Round(gps.SeaLevelAltitude * ConvertAlt(CnvIndex)) & ConvertAltTxt(CnvIndex)
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?