now question is why are different values being printed at a time …
as BLE.scan is counting for all the number of beacons nearby the argon , so shouldn’t it print one fixed number,instead of different
Where is your BLE.on() call?
Also what beacon advertising interval are all your beacons using?
Could it be that during your 0.5 sec sometimes only one, two or none of the beacons may be advertising?
If that 5 seconds applies to the beacon this will account or the cases where you see 0 and 1 - as your 0.5sec scan period might catch the beacon (1) or not (0).
Furthermore, could it be that you have another 3rd party device also acting as beacon - this would account for the 2s.
5 sec is the interval for scanning the beacons by central device which is by default mentioned in the docs of REFERENCE by iot particle.
here my central device is Argon and peripheral is beacon.
but in the above program i changed that interval to 0.5 secs
one point to clear …(just to ask whether i am thinking right or not)
ble .scan() will only return the no of beacon devices which are near the argon central device???
if yes then will i get the no of bytes in advertisement data …(asking)- by the statement scanResult->advertisingData.getData(get_data, sizeof(get_data));
here scanResult is the object of the class BleScanResult
and get_data is my buffer of length 30
and even if i try with default or by custum it is still sending different values even though i have only one beacon and both beacon and argon are placed next to each other
Then it is probably time to have a closer look at the actual advertise data the found beacons send.
do you mean scanResult->advertisingData.get(get_data, sizeof(get_data))?
If so, yes the return value of that call should return the actual count of data received (up to sizeof(get_data).
from the past 1 hour on uploading the program from web ide this thing is coming …dont know what happened all of sudden
and in the web ide it is just showing TIME RUN OUT error
my particle device is not getting flash from web ide
when i run the diagnostics test it shows that their is one problem and
also on signaling and ping it from the console it shows that device is not reachable by the particle cloud.
Also it automatically gets disconnected to wifi and cloud on its own without any external activity randomy and then gets connected to both wifi and cloud .
But argon keep on sending the data to the cloud as per the code which is last flashed on it and led status is cyan colour blinking …which means it is connected to cloud.
beacouse of this thing i am trying to re-update the device OS from workbench
using the command FLASH APPLICATION AND DEVICE OS in command palette and putting the ARGON in DFU mode …but on doing so it here agin showing error
showing error code 2 .