[[!meta date="2023-04-10 10:58"]] [[!summary example how to compute your pulse using js/css from a pankat markdown article using copilot]] [[!tag javascript BPM pulse]] # motivation below is a circle, **click it for every pulse you feel** for about 11 to 20 samples. if you **click too early or too late** it is **not so important**, missing an event actually is. only the last 20 samples are used for measurement, so if the overall pulse changes the measurement will also adapt. note: **to reset it, just wait 2 seconds without clicking then start over (will show reset text)** ## measurement value is in BPM (beats per minute):
## quality assurance i used this in the F12 shell of firefox to generate some pulses: setInterval(function(){ document.getElementById("circle").click(); }, 1000); // 60 bpm and for manual clicking i was using this: # summary the pulse is computed as the average of the last 20 samples, the average is computed as the time difference between the first and the last sample divided by the number of samples - 1. some **notable mentions** are that parts of the code was written from **copilot (chatGPT)** and all inline in the _pulse_check.mdwn_ document. **i used goland with copilot integration and both programs totally figured out that this is a wild mix of markdown, inline html/css and inline javascript and my own pankat plugins.** you can view the code, just click the link 'article source' below.