Hi Dominik,
thank you for the explanations. Somehow "PhyphoxBLE::configHandler = &receivedData;" did not work correctly with the double stopwatch and I added direct reading.. In order to test the communication I have prepared a simplified example attached here. I have included to the communication function led blinking and printing of the transferred parameter. The function is called all the time (and led is blinking without interruptions) even if the value to be transferred is not changing in phyphox. Instead it is transferred every phyphox cycle...
For the stopwatch using of the configHandler may introduce some distortions of the Arduino part... And probably it did.. So probably it would be better to read the value when the time count is finished.
Bonjour Gautier.
Some answers to your comments:
- original set to 4444.4 is historical, I wanted to see from where the parameter is coming. The good Arduino threshold value for me is about 200 when I can move from Arduino to the phone without noise.
- when the Arduino and the phone are desynchronized the phone can be put to the original state by the "RESET" button. At the same time I did not want to touch the Arduino, particularly the Arduino reset button which brakes the Bluetooth communication. Two claps is coming from my modification "Contactless acoustic stopwatch" (attached here) when I produced a video with the stopwatch and did not want to appear in it.
- thank you for the given info how to make the program better.
Cheers
Mikhail
thank you for the explanations. Somehow "PhyphoxBLE::configHandler = &receivedData;" did not work correctly with the double stopwatch and I added direct reading.. In order to test the communication I have prepared a simplified example attached here. I have included to the communication function led blinking and printing of the transferred parameter. The function is called all the time (and led is blinking without interruptions) even if the value to be transferred is not changing in phyphox. Instead it is transferred every phyphox cycle...
For the stopwatch using of the configHandler may introduce some distortions of the Arduino part... And probably it did.. So probably it would be better to read the value when the time count is finished.
Bonjour Gautier.
Some answers to your comments:
- original set to 4444.4 is historical, I wanted to see from where the parameter is coming. The good Arduino threshold value for me is about 200 when I can move from Arduino to the phone without noise.
- when the Arduino and the phone are desynchronized the phone can be put to the original state by the "RESET" button. At the same time I did not want to touch the Arduino, particularly the Arduino reset button which brakes the Bluetooth communication. Two claps is coming from my modification "Contactless acoustic stopwatch" (attached here) when I produced a video with the stopwatch and did not want to appear in it.
- thank you for the given info how to make the program better.
Cheers
Mikhail