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.

Color by Arduino Nano 33 Sense BLE
There is a function that might help you:
The "value" element has a "map" function that allows mapping numeric ranges to predefined texts. We use this for example for the GPS status or the note value in the Audio spectrum. You can see the documentation here:

Just define a list of <map>-tags with the matching number as "max" in ascending order. Unfortunately, you cannot set the matching color for the view element and would need to leave it neutral.

Example (not tested):

<value label="Color">
<map max="0">red</map>
<map max="1">orange</map>
<map max="2">yellow</map>

Phyphox goes through the list and uses the first matching entry. You can leave out min and max for the last entry to use it as fallback or if it also has a criterium and no entry matches, phyphox should fall back to the numeric value.

Messages In This Thread
Color by Arduino Nano 33 Sense BLE - by solid - 01-05-2021, 09:54 AM
RE: Color by Arduino Nano 33 Sense BLE - by solid - 01-06-2021, 09:57 AM
RE: Color by Arduino Nano 33 Sense BLE - by solid - 09-15-2021, 07:57 AM
RE: Color by Arduino Nano 33 Sense BLE - by Sebastian Staacks - 09-15-2021, 01:15 PM

Forum Jump: