# How to make a simple animation of a heartbeat monitor

**URL:** <https://discourse.processing.org/t/how-to-make-a-simple-animation-of-a-heartbeat-monitor/33614>\
**Category:** Beginners\
**Created:** [November 19, 2021, 1:25pm UTC](https://discourse.processing.org/t/how-to-make-a-simple-animation-of-a-heartbeat-monitor/33614 "2021-11-19T13:25:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![N00b](https://avatars.discourse-cdn.com/v4/letter/n/2bfe46/32.png) [@N00b](https://discourse.processing.org/u/N00b)\
**Post date:** [November 19, 2021, 1:25pm UTC](https://discourse.processing.org/t/how-to-make-a-simple-animation-of-a-heartbeat-monitor/33614/1 "2021-11-19T13:25:17Z")

</div>

Hello everyone,

I’m very lost! I need to make a simple animation of a heartbeat monitor. The default setting should just be a simple horizontal line in the middle of the screen and when key pressed the line should take a jump as if it was a heartbeat.

I don’t know what to do from this point:  
void setup() {  
size(400, 400);  
}

void draw() {  
background(255);  
line(0, height/2, 400, height/2);

}

Would any of you help me get further with the coding?  
Thanks in advance!

Best Julie

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [November 19, 2021, 1:35pm UTC](https://discourse.processing.org/t/how-to-make-a-simple-animation-of-a-heartbeat-monitor/33614/2 "2021-11-19T13:35:54Z")

</div>

Hello,

There are lots of resources and examples here to get you started:

> **[Welcome to Processing!](https://processing.org/)**
>
> Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. Since 2001, Processing has promoted software literacy within the visual arts…

Start simple… plot some points in a for loop and build on that.

To get you started:  
[https://processing.org/reference/point\_.html](https://processing.org/reference/point_.html)  
[https://processing.org/reference/for.html](https://processing.org/reference/for.html)

`:)`
