Update map.js

This commit is contained in:
Tyler Cooper 2025-08-19 11:46:11 -05:00 committed by GitHub
parent 55e3b09415
commit 660938e1f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,7 +4,7 @@ export default {
bytecodeKey: "mapValue",
name: "Map",
colour: 120,
description: "Scale a value from one range of numbers to another",
description: "Transform sensor readings and data values by scaling them from one number range to another. Essential for IoT projects that need to convert raw sensor data (like 0-1023 from Arduino analog pins) into meaningful units (like 0-100% humidity), or translate between different measurement systems. Perfect for normalizing data, creating percentage values, or adapting sensor outputs to match your specific needs.",
connections: {
mode: "value",
output: "number",
@ -17,13 +17,13 @@ export default {
`,
inputs: {
VALUE: {
description: "The number to scale from the original range to the target range.",
description: "The raw number you want to convert to a different scale. Examples: sensor reading of 512 (from 0-1023 analog range), temperature of 25°C (for Fahrenheit conversion), or any numerical data that needs scaling to a new range.",
check: "expression",
bytecodeProperty: "value",
shadow: 'io_math_number'
},
FROM_RANGE: {
description: "The original range that the input value comes from (e.g., sensor readings from 0 to 1023).",
description: "The original scale that your input value currently represents. Examples: (0,1023) for Arduino analog sensors, (0,255) for RGB color values, (-40,125) for temperature sensor ranges, or (0,100) for percentage data that needs different scaling.",
check: 'range',
bytecodeProperty: "from",
shadow: {
@ -41,7 +41,7 @@ export default {
}
},
TO_RANGE: {
description: "The target range to scale the value to (e.g., convert to 0.0-1.0 for percentages).",
description: "The new scale you want to convert your value to. Examples: (0,100) for percentage displays, (0.0,1.0) for normalized values, (32,212) for Fahrenheit conversion, or any target range that matches your display needs or system requirements.",
check: 'range',
bytecodeProperty: "to",
shadow: {