This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Double acoustic stopwatch and speed of sound
#6
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


Attached Files
.txt   PtoA1.ino.txt (Size: 1.36 KB / Downloads: 332)
.phyphox   PtoA1.phyphox (Size: 881 bytes / Downloads: 315)
.phyphox   acoustic_stop_mIv2.phyphox (Size: 7.9 KB / Downloads: 315)
Reply


Messages In This Thread
RE: Double acoustic stopwatch and speed of sound - by solid - 01-06-2021, 08:01 AM

Forum Jump: