# Function map on Node-RED

**URL:** <https://discourse.nodered.org/t/function-map-on-node-red/30141>\
**Category:** General\
**Created:** [15 July 2020 18:06 UTC](https://discourse.nodered.org/t/function-map-on-node-red/30141 "2020-07-15T18:06:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lalo](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lalo](https://discourse.nodered.org/u/lalo)\
**Post date:** [15 July 2020 18:06 UTC](https://discourse.nodered.org/t/function-map-on-node-red/30141/1 "2020-07-15T18:06:56Z")

</div>

Hi, I'm using this fuction on the Arduino IDE, but I want to use it in Node-RED some documentation that I must see?

This is the function I need to use `map` but I'm not sure in Node-RED the equivalent for that.

```auto
output_value = map(output_value,500,0,0,250);

```

I use this [https://www.arduino.cc/reference/en/language/functions/math/map/](https://www.arduino.cc/reference/en/language/functions/math/map/) because I was using this function on Arduino to map my values, so I think the Range Node is the equivalent

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [15 July 2020 18:18 UTC](https://discourse.nodered.org/t/function-map-on-node-red/30141/2 "2020-07-15T18:18:05Z")

</div>

Use the range node for the nearest equivalent

---

<div class="post-metadata">

**Author:** ![lalo](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lalo](https://discourse.nodered.org/u/lalo)\
**Post date:** [15 July 2020 18:18 UTC](https://discourse.nodered.org/t/function-map-on-node-red/30141/3 "2020-07-15T18:18:41Z")

</div>

Thanks, that was so usefull

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 July 2020 18:33 UTC](https://discourse.nodered.org/t/function-map-on-node-red/30141/4 "2020-07-29T18:33:25Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
