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.

Multiple Sonsors (integrated and BT) via MQTT
#2
Hey Jan,

let me start with the bluetooth topic:

With the "new bluetooth experiment" option in phyphox you will get the phyphox-configuration (xml file) which is store on your esp32/arduino. By default its a simple experiment which expects just a single float value. If you would like to customize this experiment to display more data (or change units and so on) you have different options:

A) Create your custom epxeriment directy within the Arduino IDE. Therefore you might want to check the phyphoxBLE example "createExperiment".

But keep in mind that this library feature does not support all features you might now from other phyphox experiments. This leads me to another option

B) Use the p web editor: https://phyphox.org/editor/

With the web editor you can create "easily" your own experiment-configuration (at least using the smartphone sensors ). For bluetooth communication things get a litte bit more complicated, because you need some bluetooth low energy specific information. I think a good way for beginners to start is to use the experiment which is created in "createExperiment". You can get your customized "createExperiment" the following way:
  • customize the experiment/sketch to your personal needs
  • flash the experiment to the ESP32/Arduino and open it with phyphox (new bluetooth experiment)
  • press on the 3 dots in top right corner -> save experiment -> share it by mail or any messenger you can use on your pc. 
  • go to phyphox.org/editor and press "load experiment" (bottom left)
Now you can further customize the experiment with the online editor or check how the bluetooth part is done. 


I have to say here aswell: The online editor has much more features than the arduino library but it is also limited. To use all available features you have to create the xml/phyphox file by your own. To get an idea how the the actually .phyphox file looks like press on the "xml" tab in the online editor.
Feel free to mix these 3 techniques to create your own experiment!

Also you might want to check out the phyphox wiki to get more information about bluetooth, analysis modules and so on.

https://phyphox.org/wiki/index.php/Analysis_modules
https://phyphox.org/wiki/index.php/Bluetooth_Low_Energy

The MQTT support is quite new, so there are not many examples available right now. Also the web editor does not support this feature right now. But you can get some information in the wiki. There is also an example to send acceleration data via MQTT

https://phyphox.org/wiki/index.php/Network_Connections

I know Sebastian is using an ESP32 with a CO2 sensor and send these values via MQTT (ESP32 has wifi on board!), maybe he can share his sketch to get an idea how it works. 

Hope this solves your questions! Otherwise feel free to ask for a more detailed explanation =)

Cheers
Dominik
Reply


Messages In This Thread
RE: Multiple Sonsors (integrated and BT) via MQTT - by Dominik Dorsel - 12-11-2020, 03:05 PM

Forum Jump: