This is an example program that runs on a stm32f3 discovery board and reports ADC readings for pin PA2
STM32F3 Discovery board should be quite commonly available, including on AliExpress
The Pulse Sensor is one of the lowest cost models found on AliExpress, Generally searching as pulsesensor.
It looks like this:
You can find more details about how it works around the web, like at Last Minute Engineers.
GND
of the sensor is connected toGND
of the discovery boardVcc
of the sensor is connected to3V
of the discovery boardA0
(Sig) of the sensor is connected to thePA2
pin of the discovery board
You can just execute the binary and it will use RTT to display timestamp + pulse value
cargo run
You can feed it to plotting. A very basic version would be:
cargo run | feedgnuplot --stream --domain --lines
If you place your finger on the sensor (with some fiddling on pressure and how it is held), this results in an output that looks like: