en-us_commands:reference:iscalef
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en-us_commands:reference:iscalef [2026/09/07 21:52] – 만듦 - 바깥 편집 127.0.0.1 | en-us_commands:reference:iscalef [2026/09/08 00:53] (current) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| <code cpp> | <code cpp> | ||
| - | void loop() { | + | void setup() { |
| - | | + | |
| - | | + | } |
| - | float voltage = Iscalef((float)raw, | + | |
| - | Serial.println(percent); | + | void loop() { |
| - | Serial.println(voltage, 2); | + | const float raw = (float)analogRead(A0); |
| + | const float pressureBar = Iscalef(raw, 0.0F, 32767.0F, 0.0F, 10.0F); // Map a floating-point input to the specified floating-point range. | ||
| + | | ||
| + | delay(100); | ||
| } | } | ||
| </ | </ | ||
| Line 31: | Line 33: | ||
| * Out-of-range inputs are clamped to the nearest output endpoint. | * Out-of-range inputs are clamped to the nearest output endpoint. | ||
| * Both commands perform only linear range conversion. They do not replace sensor calibration or electrical protection. | * Both commands perform only linear range conversion. They do not replace sensor calibration or electrical protection. | ||
| + | |||
| + | ===== Built-in Commands in the Same Category ===== | ||
| + | |||
| + | * [[: | ||
| [[: | [[: | ||
en-us_commands/reference/iscalef.1788785568.txt.gz · Last modified: by 127.0.0.1
