# Need help on averaging numbers for a project

**URL:** https://forum.xod.io/t/need-help-on-averaging-numbers-for-a-project/326
**Category:** Uncategorized
**Created:** [December 30, 2017, 9:11pm UTC](https://forum.xod.io/t/need-help-on-averaging-numbers-for-a-project/326 "2017-12-30T21:11:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![michaelvdberghe](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@michaelvdberghe](https://forum.xod.io/u/michaelvdberghe)
#### Post date: [December 30, 2017, 9:11pm UTC](https://forum.xod.io/t/need-help-on-averaging-numbers-for-a-project/326/1 "2017-12-30T21:11:52Z")

</div>

hi peeps,

i’m looking for a way to average 5 value’s to a single number to start a calculation and then print it to an 16x2 lcd

i’"m making a beer color measure device for my homebrew club and the idea is that a 430nm led wil licht up 5 times and an ldr takes 5 reading than average the numbers and makes a calculation and prints the value on an lcd screen

any advice ? i don’t understand anything about computer code i’m just a simple welder

---

<div class="post-metadata">

### Author: ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)
#### Post date: [December 31, 2017, 12:50pm UTC](https://forum.xod.io/t/need-help-on-averaging-numbers-for-a-project/326/2 "2017-12-31T12:50:06Z")

</div>

Hello and welcome.

Well, you need something like:

![avg-measure-main](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/e869cd03aeebb887191443cca650f28f35f191de.png)

But, there’s no such node as `avg-measure` in XOD standard library (yet). No problem, you can make your own:

 ![avg-measure](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/e2828252205a600fec1dd5b1883a11ce1b2be591.png)

The basic idea is to trigger N readings and store their sum with `count` node. When N readings are accumulated, pass the result of the “sum / N” to the node output.

I didn’t check it for myself but hope I gave you the necessary direction. A xodball of the project is attached: [lets-make-a-beer.xodball](https://forum.xod.io/uploads/xod/original/1X/d4c8ddd78b68891e264f8fec6d60ea5e5d8501d4.xodball) (7.3 KB)

---

<div class="post-metadata">

### Author: ![michaelvdberghe](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@michaelvdberghe](https://forum.xod.io/u/michaelvdberghe)
#### Post date: [December 31, 2017, 2:27pm UTC](https://forum.xod.io/t/need-help-on-averaging-numbers-for-a-project/326/3 "2017-12-31T14:27:45Z")

</div>

thanks. i think i can add this to what i’ve got for the moment

i wanted to upload my project so far butt the forum won’t let me

---

<div class="post-metadata">

### Author: ![michaelvdberghe](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@michaelvdberghe](https://forum.xod.io/u/michaelvdberghe)
#### Post date: [December 31, 2017, 2:30pm UTC](https://forum.xod.io/t/need-help-on-averaging-numbers-for-a-project/326/4 "2017-12-31T14:30:06Z")

</div>

here’s what i’ve got for the moment

[test.xodball](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/2f975186aea00eac8679f25b7e9d83d3e35699f6.xodball) (5.6 KB)
