Just wondering if I’ve got something fundamentally wrong:
Using 2 Android devices and the example ‘Oscilloscope’ code from your site.
Datastreaming Device ’A’ sends sine wave data to the other device ‘B’ (Oscilloscope) over Bluetooth. Working fine. Can see numbers arriving in ‘B’.
Have a click event to hear data coming in at 1 second intervals. See data for variable ‘CurVal’ changing in log window as expected (a slow sine wave).
Bluetooth code in ‘B’ is in a service module attached/added to Oscilloscope’s main module.
Data for the GetValues routine (Oscilloscope main) is retrieved from a variable in the service module called: GetBTData
Main module
Sub GetValues
Dim i As Int
For i = 0 To CurvesNb
CurveVal(i, ii) = GetBTData.CurVal
Next
End Sub
All simple stuff....
Why does the data transfer stop when I press the oscilloscope's ‘Start’ button? The clicking stops and only the last value in GetBTData.CurVal is plotted? Isn't the service module using a separate thread?
On pressing the oscilloscope's ‘Stop’ button, it appears that the new incoming data has been held in the BlueTooth buffer, as I hear a long blast of clicks, before it returns to the correct 'click per second' interval.
Help!
Using 2 Android devices and the example ‘Oscilloscope’ code from your site.
Datastreaming Device ’A’ sends sine wave data to the other device ‘B’ (Oscilloscope) over Bluetooth. Working fine. Can see numbers arriving in ‘B’.
Have a click event to hear data coming in at 1 second intervals. See data for variable ‘CurVal’ changing in log window as expected (a slow sine wave).
Bluetooth code in ‘B’ is in a service module attached/added to Oscilloscope’s main module.
Data for the GetValues routine (Oscilloscope main) is retrieved from a variable in the service module called: GetBTData
Main module
Sub GetValues
Dim i As Int
For i = 0 To CurvesNb
CurveVal(i, ii) = GetBTData.CurVal
Next
End Sub
All simple stuff....
Why does the data transfer stop when I press the oscilloscope's ‘Start’ button? The clicking stops and only the last value in GetBTData.CurVal is plotted? Isn't the service module using a separate thread?
On pressing the oscilloscope's ‘Stop’ button, it appears that the new incoming data has been held in the BlueTooth buffer, as I hear a long blast of clicks, before it returns to the correct 'click per second' interval.
Help!