# Real-Time dataviz with Neurosky Mindwave mobile

**URL:** <https://discourse.processing.org/t/real-time-dataviz-with-neurosky-mindwave-mobile/12567>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [July 7, 2019, 4:09pm UTC](https://discourse.processing.org/t/real-time-dataviz-with-neurosky-mindwave-mobile/12567 "2019-07-07T16:09:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![yashkhataokar](https://avatars.discourse-cdn.com/v4/letter/y/13edae/32.png) [@yashkhataokar](https://discourse.processing.org/u/yashkhataokar)\
**Post date:** [July 7, 2019, 4:09pm UTC](https://discourse.processing.org/t/real-time-dataviz-with-neurosky-mindwave-mobile/12567/1 "2019-07-07T16:09:13Z")

</div>

Hi, I have a visual that reacts to the live data from the EEG headset, the problem is the data streams at a 1 sec interval and the form of the visual changes accordingly, when there is a huge jump in the data value the animation looks broken. Is there a way to either transition the animation from one value to another or reduce the time interval to make the animation look more smoother?

![1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/62fa34cc35b8133a28ed1d0fb13ab420828cff85.gif)

---

<div class="post-metadata">

**Author:** ![InferNova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/infernova/32/6009_2.png) [@InferNova](https://discourse.processing.org/u/InferNova)\
**Post date:** [July 7, 2019, 4:29pm UTC](https://discourse.processing.org/t/real-time-dataviz-with-neurosky-mindwave-mobile/12567/2 "2019-07-07T16:29:14Z")

</div>

Hey There!  
Maybe something that stores the current size of the animation and gradually increments to the new size after 1 sec ?

---

<div class="post-metadata">

**Author:** ![yashkhataokar](https://avatars.discourse-cdn.com/v4/letter/y/13edae/32.png) [@yashkhataokar](https://discourse.processing.org/u/yashkhataokar)\
**Post date:** [July 7, 2019, 4:44pm UTC](https://discourse.processing.org/t/real-time-dataviz-with-neurosky-mindwave-mobile/12567/3 "2019-07-07T16:44:51Z")

</div>

Makes sense… How would I go about it? Also would it create a greater delay to real time values?

---

<div class="post-metadata">

**Author:** ![InferNova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/infernova/32/6009_2.png) [@InferNova](https://discourse.processing.org/u/InferNova)\
**Post date:** [July 7, 2019, 5:17pm UTC](https://discourse.processing.org/t/real-time-dataviz-with-neurosky-mindwave-mobile/12567/4 "2019-07-07T17:17:27Z")

</div>

It wouldn’t create much delay. Not noticeable depending on how fast you set the values to increase to that current it could feel delayed. But it won’t have any impactful performance issues. To go about this you can do this storeC = currentSize storeF = futureSize if storeC \< storeF storeC+=0.5 or whatever value.

---

<div class="post-metadata">

**Author:** ![yashkhataokar](https://avatars.discourse-cdn.com/v4/letter/y/13edae/32.png) [@yashkhataokar](https://discourse.processing.org/u/yashkhataokar)\
**Post date:** [July 7, 2019, 8:37pm UTC](https://discourse.processing.org/t/real-time-dataviz-with-neurosky-mindwave-mobile/12567/5 "2019-07-07T20:37:28Z")

</div>

Thanks 🙂 will try it out and let you know…

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [July 9, 2019, 3:03pm UTC](https://discourse.processing.org/t/real-time-dataviz-with-neurosky-mindwave-mobile/12567/6 "2019-07-09T15:03:23Z")

</div>

What is the object / array you are animating? Ideally you should cross-fade over about 0.5 seconds between oldSnapshot and newSnapshot.

---

<div class="post-metadata">

**Author:** ![yashkhataokar](https://avatars.discourse-cdn.com/v4/letter/y/13edae/32.png) [@yashkhataokar](https://discourse.processing.org/u/yashkhataokar)\
**Post date:** [July 9, 2019, 5:56pm UTC](https://discourse.processing.org/t/real-time-dataviz-with-neurosky-mindwave-mobile/12567/7 "2019-07-09T17:56:24Z")

</div>

Its a particle-sphere…

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [July 9, 2019, 7:31pm UTC](https://discourse.processing.org/t/real-time-dataviz-with-neurosky-mindwave-mobile/12567/8 "2019-07-09T19:31:52Z")

</div>

Are there always the same number of points, and are the points well-ordered? Then you can just lerp each old point to the new point–eg PVector.lerp
