Android Question BLE CSC (cadence/speed)

Mvula

Member
Licensed User
Longtime User
Based on Erel's Heartratemonitor this code can detect the BLE candence/speed sensors.

how do i set "Main.instellingen.sensors.Get(X)"

below is the error i am getting

thanks,
Mvula
CadenceMonitor - 58: Syntax error.
CadenceMonitor - 51: Unknown member: instellingen
CadenceMonitor - 50: Unknown member: instellingen
CadenceMonitor - 49: Unknown member: instellingen
CadenceMonitor - 129: Unknown member: crankdata
CadenceMonitor - 124: Unknown member: crankdata
CadenceMonitor - 123: Unknown member: crankdata
CadenceMonitor - 110: Unknown member: wheelrevolutions
CadenceMonitor - 86: Unknown member: crankdata
CadenceMonitor - 69: Undeclared variable 'sensor' is used before it was assigned any value.
CadenceMonitor - 68: Undeclared variable 'sensor' is used before it was assigned any value.
CadenceMonitor - 67: Undeclared variable 'sensor' is used before it was assigned any value.
CadenceMonitor - 66: Undeclared variable 'sensor' is used before it was assigned any value.
CadenceMonitor - 53: Undeclared variable 'sensor' is used before it was assigned any value.
CadenceMonitor - 16: Undeclared variable 'https' is used before it was assigned any value.
CadenceMonitor - 64: Unknown type: sensortype<br />Are you missing a library reference?
CadenceMonitor - 52: Unknown type: sensortype<br />Are you missing a library reference?
 

DonManfred

Expert
Licensed User
Longtime User
Hiding your code is a good idea if you expect not to get any useful answer.
 
Upvote 0

Mvula

Member
Licensed User
Longtime User
i know i am having a bad day, but does this help??

Sub Activity_Create(FirstTime As Boolean)
'StopService(Starter)

Activity.LoadLayout("1")
'Activity.Title = "Search for Ble devices " & gcVersion
Activity.Title = gcVersion
'Msgbox("we are here","")
Log("started")

sbLowHr.Initialize
sbHighHr.Initialize

smb1.Initialize("smb1")

gcManufacturer = phone1.Manufacturer
gcModel = phone1.Model
gcProduct = phone1.Product
gcSerialNumber = phone1.GetSettings("android_id")

'''''''''''
If FirstTime Then
GetScale
End If

If File.Exists(File.DirAssets,gcDbfFileName.ToLowerCase) = True Then
If File.Exists(File.DirInternal,gcDbfFileName.ToLowerCase) = False Then
File.copy(File.DirAssets,gcDbfFileName.ToLowerCase, _
File.DirInternal,gcDbfFileName)
' Dim cText As String = "Busy installing " & gcDbfFileName
'
' ct1.ShowBitmap(cText,5000,Gravity.CENTER_HORIZONTAL,0,0, _
' LoadBitmap(File.DirAssets, "smiley.gif"))
End If
Else
pw.KeepAlive(True) 'Display on, bright

Msgbox2("does NOT exist!" & CRLF & "program will close.", gcDbfFileName, "Close", "", "", LoadBitmap(File.DirAssets, "smiley.gif"))

pw.ReleaseKeepAlive

Activity.Finish
ExitApplication
End If

SQL1.Initialize(File.DirInternal, gcDbfFileName, True)

Check4Updates

BtAdmin.Initialize("MyBlueTooth")
If BtAdmin.IsEnabled = False Then
BtAdmin.Enable
'Else
' BlueTooth.Listen 'listen for incoming connections
End If

'StartScan
StartScanning
end sub

Sub StartScanning
'https://www.b4x.com/android/forum/threads/ble-heart-rate-monitor.64102/#content
Dim HrMonitor As HeartRateMonitor
HrMonitor.Initialize

Dim CadMonitor As CadenceMonitor
CadMonitor.Initialize

End Sub
 
Upvote 0
Top