Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

![logo](https://avatars0.githubusercontent.com/u/7002937?v=3&s=200)
## [PulseSensor.com](https://pulsesensor.com) Playground

> **Current official Arduino library:** Install **PulseSensor Playground** in the Arduino Library Manager. New users should begin with [GettingStartedProject](examples/GettingStartedProject/GettingStartedProject.ino), then try [PulseSensor_BPM](examples/PulseSensor_BPM/PulseSensor_BPM.ino).

[![How To Update Your Playground Code](https://github.com/yury-g/MyCodePlayground/blob/master/images/updateLib.png?raw=true)](https://youtu.be/Pt0fJvIeryY)

```
Expand Down Expand Up @@ -53,8 +56,8 @@ To install the PulseSensor Playground Library, in Arduino, to go
<img src="https://github.com/yury-g/MyCodePlayground/blob/master/images/ManageLibraries.png" width="500">


In the Library Manager: Search for and Select
`"PulseSensor.com`
In the Library Manager, search for and select:
`PulseSensor Playground`

<img src="https://github.com/yury-g/MyCodePlayground/blob/master/images/SearchForPulseSensor.png" width="500">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void setup() {
likely because our particular Arduino platform interrupts
aren't supported yet.

If your Sketch hangs here, try PulseSensor_BPM_Alternative.ino,
which doesn't use interrupts.
If your Sketch hangs here, report the board name and Arduino core
version at https://github.com/WorldFamousElectronics/PulseSensorPlayground/issues.
*/
for (;;) {
// Flash the led to show things didn't work.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ void setup() {
likely because our particular Arduino platform interrupts
aren't supported yet.

If your Sketch hangs here, try PulseSensor_BPM_Alternative.ino,
which doesn't use interrupts.
If your Sketch hangs here, report the board name and Arduino core
version at https://github.com/WorldFamousElectronics/PulseSensorPlayground/issues.
*/
for (;;) {
// Flash the led to show things didn't work.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ void setup() {
likely because our particular Arduino platform interrupts
aren't supported yet.

If your Sketch hangs here, try PulseSensor_BPM_Alternative.ino,
which doesn't use interrupts.
If your Sketch hangs here, report the board name and Arduino core
version at https://github.com/WorldFamousElectronics/PulseSensorPlayground/issues.
*/
for (;;) {
// Flash the led to show things didn't work.
Expand Down
4 changes: 2 additions & 2 deletions examples/PulseSensor_BPM/PulseSensor_BPM.ino
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ void setup() {
likely because our particular Arduino platform interrupts
aren't supported yet.

If your Sketch hangs here, try PulseSensor_BPM_Alternative.ino,
which doesn't use interrupts.
If your Sketch hangs here, report the board name and Arduino core
version at https://github.com/WorldFamousElectronics/PulseSensorPlayground/issues.
*/
for (;;) {
// Flash the led to show things didn't work.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ void setup() {
likely because our particular Arduino platform interrupts
aren't supported yet.

If your Sketch hangs here, try PulseSensor_BPM_Alternative.ino,
which doesn't use interrupts.
If your Sketch hangs here, report the board name and Arduino core
version at https://github.com/WorldFamousElectronics/PulseSensorPlayground/issues.
*/
for (;;) {
// Flash the led to show things didn't work.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ void setup() {
likely because our particular Arduino platform interrupts
aren't supported yet.

If your Sketch hangs here, try PulseSensor_BPM_Alternative.ino,
which doesn't use interrupts.
If your Sketch hangs here, report the board name and Arduino core
version at https://github.com/WorldFamousElectronics/PulseSensorPlayground/issues.
*/
for (;;) {
// Flash the led to show things didn't work.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ void setup() {
likely because our particular Arduino platform interrupts
aren't supported yet.

If your Sketch hangs here, try PulseSensor_BPM_Alternative.ino,
which doesn't use interrupts.
If your Sketch hangs here, report the board name and Arduino core
version at https://github.com/WorldFamousElectronics/PulseSensorPlayground/issues.
*/
for (;;) {
// Flash the led to show things didn't work.
Expand Down
52 changes: 23 additions & 29 deletions resources/CodeDescriptions.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
| # | Example Code | Features | Ideal For |
|-----|-------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------------------|
| 1 | [GettingStartedProject.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/GettingStartedProject/GettingStartedProject.ino) | Introductory setup for PulseSensor and Arduino.<br>Basic hardware and library integration. | Beginners, first-time users |
| 2 | [Getting_BPM_to_Monitor.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/Getting_BPM_to_Monitor/Getting_BPM_to_Monitor.ino) | Real-time BPM monitoring on Serial Monitor.<br>Heartbeat alerts.<br>LED visualization on PIN 13. | Beginners, basic projects |
| 3 | [PulseSensor_ATtiny85_Serial.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_ATtiny85_Serial/PulseSensor_ATtiny85_Serial.ino) | PulseSensor use with ATtiny85, including serial communication. | Projects using ATtiny85, Serial communication |
| 4 | [PulseSensor_ATtiny85_noSerial.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_ATtiny85_noSerial/PulseSensor_ATtiny85_noSerial.ino) | PulseSensor with ATtiny85, no serial communication. | ATtiny85 based projects, simplicity focus |
| 5 | [PulseSensor_BPM.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_BPM/PulseSensor_BPM.ino) | Standard BPM measurement setup with PulseSensor. | Standard BPM tracking projects |
| 6 | [PulseSensor_BPM_Alternative.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_BPM_Alternative/PulseSensor_BPM_Alternative.ino) | Alternative BPM measurement method. | Alternative approaches, experimental setups |
| 7 | [PulseSensor_BPM_UNO_R4.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_BPM_UNO_R4/PulseSensor_BPM_UNO_R4.ino) | BPM setup for Arduino UNO R4. | Arduino UNO R4 specific projects |
| 8 | [PulseSensor_BPM_UNO_R4_LEDmatrix_Heartbeat.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_BPM_UNO_R4_LEDmatrix_Heartbeat/PulseSensor_BPM_UNO_R4_LEDmatrix_Heartbeat.ino) | Heartbeat display on LED matrix using UNO R4. | Visual heartbeat display projects |
| 9 | [PulseSensor_BPM_UNO_R4_LEDmatrix_Plotter.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_BPM_UNO_R4_LEDmatrix_Plotter/PulseSensor_BPM_UNO_R4_LEDmatrix_Plotter.ino) | Plotting heartbeat data on LED matrix with UNO R4. | Advanced visualization, UNO R4 users |
| 10 | [PulseSensor_DUE.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_DUE/PulseSensor_DUE.ino) | Demonstrates PulseSensor on Arduino DUE. | Arduino DUE specific projects |
| 11 | [PulseSensor_ESP32.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_ESP32/PulseSensor_ESP32.ino) | PulseSensor integration with ESP32 module. | ESP32 advanced projects |
| 12 | [PulseSensor_Nucleo.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_Nucleo/PulseSensor_Nucleo.ino) | Using PulseSensor with Nucleo boards. | Nucleo board specific applications |
| 13 | [PulseSensor_PTT.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_PTT/PulseSensor_PTT.ino) | Pulse Transit Time example using two PulsleSensors | Measure pulse wave velocity with a correspoinding Processing sketch
| 14 | [PulseSensor_RP2040.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_RP2040/PulseSensor_RP2040.ino) | PulseSensor examples for RP2040 boards. | RP2040 board projects |
| 15 | [PulseSensor_Servo.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_Servo/PulseSensor_Servo.ino) | Control a servo based on heart rate data. | Hardware interaction, creative projects |
| 16 | [PulseSensor_Speaker.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_Speaker/PulseSensor_Speaker.ino) | Audio feedback from heart rate data with a speaker. | Audio-interactive projects |
| 17 | [PulseSensor_nRF52.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_nRF52/PulseSensor_nRF52.ino) | PulseSensor with nRF52 series boards. | nRF52 Bluetooth projects |
| 18 | [PulseSensor_nRF52840_Feather_Express.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/PulseSensor_nRF52840_Feather_Express/PulseSensor_nRF52840_Feather_Express.ino) | nRF52840 Feather Express board integration. | BLE focused, nRF52840 Feather Express users |
| 19 | [SoftwareSerialDemo.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/SoftwareSerialDemo/SoftwareSerialDemo.ino) | Software serial communication with PulseSensor. | Projects requiring software serial comms |
| 20 | [TwoPulseSensors_On_OneArduino.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/TwoPulseSensors_On_OneArduino/TwoPulseSensors_On_OneArduino.ino) | Connecting two PulseSensors to a single Arduino. | Multi-sensor, complex data handling projects|
| 21 | [TwoPulseSensors_On_OneArduino_Alternative.ino](https://github.com/WorldFamousElectronics/PulseSensorPlayground/blob/master/examples/TwoPulseSensors_On_OneArduino_Alternative/TwoPulseSensors_On_OneArduino_Alternative.ino) | Alternative approach for using two PulseSensors with Arduino. | Experimental setups, alternative methods |
# PulseSensor Playground examples

This index lists the example sketches that ship with the current library. Start with the raw-signal project before moving to BPM detection.


Joel's Notes:
Best not to use underscores in the names of the code files, because some markdown interprets it as italic.

Getting BPM to Monitor.ino does use interrupts, and I think it is one point where the user experience breaks.

| Example | What it demonstrates | Good starting point for |
|---|---|---|
| [GettingStartedProject](../examples/GettingStartedProject/GettingStartedProject.ino) | Raw pulse signal in the Serial Plotter and heartbeat LED | First setup and signal troubleshooting |
| [Getting_BPM_to_Monitor](../examples/Getting_BPM_to_Monitor/Getting_BPM_to_Monitor.ino) | BPM and beat messages in the Serial Monitor | A short beginner BPM sketch |
| [PulseSensor_BPM](../examples/PulseSensor_BPM/PulseSensor_BPM.ino) | Full library BPM setup and serial output | Standard BPM projects |
| [PulseSensor_ATtiny85_Serial](../examples/PulseSensor_ATtiny85_Serial/PulseSensor_ATtiny85_Serial.ino) | Beat detection with serial output on ATtiny85 | ATtiny85 projects with serial output |
| [PulseSensor_ATtiny85_noSerial](../examples/PulseSensor_ATtiny85_noSerial/PulseSensor_ATtiny85_noSerial.ino) | Beat detection without serial output on ATtiny85 | Small standalone ATtiny85 projects |
| [PulseSensor_ESP32](../examples/PulseSensor_ESP32/PulseSensor_ESP32.ino) | ESP32 Wi-Fi BPM web page on a local network | ESP32 network projects |
| [PulseSensor_Pulse_Transit_Time](../examples/PulseSensor_Pulse_Transit_Time/PulseSensor_Pulse_Transit_Time.ino) | Pulse transit time with two sensors | Two-sensor timing experiments |
| [PulseSensor_Servo_Motor](../examples/PulseSensor_Servo_Motor/PulseSensor_Servo_Motor.ino) | Servo movement synchronized to detected beats | Motion projects |
| [PulseSensor_Speaker](../examples/PulseSensor_Speaker/PulseSensor_Speaker.ino) | Speaker tone synchronized to detected beats | Audio feedback projects |
| [PulseSensor_UNO_R4_WiFi_LEDmatrix_Heartbeat](../examples/PulseSensor_UNO_R4_WiFi_LEDmatrix_Heartbeat/PulseSensor_UNO_R4_WiFi_LEDmatrix_Heartbeat.ino) | Heart animation on the UNO R4 WiFi LED matrix | UNO R4 WiFi visual projects |
| [PulseSensor_UNO_R4_WiFi_LEDmatrix_Plotter](../examples/PulseSensor_UNO_R4_WiFi_LEDmatrix_Plotter/PulseSensor_UNO_R4_WiFi_LEDmatrix_Plotter.ino) | Pulse waveform on the UNO R4 WiFi LED matrix | UNO R4 WiFi signal visualization |
| [PulseSensor_XIAO_ESP32S3_BPM](../examples/PulseSensor_XIAO_ESP32S3_BPM/PulseSensor_XIAO_ESP32S3_BPM.ino) | BPM in the Serial Monitor on XIAO ESP32S3 | XIAO ESP32S3 first projects |
| [PulseSensor_XIAO_ESP32S3_OLED](../examples/PulseSensor_XIAO_ESP32S3_OLED/PulseSensor_XIAO_ESP32S3_OLED.ino) | Waveform and BPM on an SH1106 OLED | XIAO ESP32S3 display projects |
| [PulseSensor_XIAO_ESP32S3_WiFi](../examples/PulseSensor_XIAO_ESP32S3_WiFi/PulseSensor_XIAO_ESP32S3_WiFi.ino) | Wi-Fi pulse dashboard | XIAO ESP32S3 browser projects |
| [PulseSensor_XIAO_ESP32S3_WiFi_OLED](../examples/PulseSensor_XIAO_ESP32S3_WiFi_OLED/PulseSensor_XIAO_ESP32S3_WiFi_OLED.ino) | Wi-Fi dashboard and local OLED display | Combined browser and display projects |
| [PulseSensor_nRF52_Heartrate_Monitor_Service](../examples/PulseSensor_nRF52_Heartrate_Monitor_Service/PulseSensor_nRF52_Heartrate_Monitor_Service.ino) | BLE Heart Rate Monitor service on supported nRF52 boards | nRF52 BLE projects |
| [SoftwareSerialDemo](../examples/SoftwareSerialDemo/SoftwareSerialDemo.ino) | PulseSensor output through `SoftwareSerial` | Alternative serial connections |
| [TwoPulseSensors_On_OneArduino](../examples/TwoPulseSensors_On_OneArduino/TwoPulseSensors_On_OneArduino.ino) | Two PulseSensors on one Arduino | Multi-sensor projects |
| [PulseSensorLIbrary_V2_System_Test](../examples/PulseSensorLIbrary_V2_System_Test/PulseSensorLIbrary_V2_System_Test.ino) | Interactive checks of the library API | Maintainer and regression testing |