PulseSensor · Two-channel Web Serial

RESEARCH BETA

Pulse Transit Time Lab

Compare synchronized proximal and distal pulse waves. Pairing and quality checks run locally in this browser.

Disconnected PTT1 dual stream · 250000 baud
Two synchronized sensors

A0 proximal · A1 distal

Start with an earlobe at A0 and a fingertip at A1. The lab accepts only one-to-one beats inside the selected timing window.

PTT1 · 500 samples/s
A0 · Proximal
A1 · Distal
Pairing window
A0 PROXIMALWARMING

Signal -- · threshold 550 fixed

A1 DISTALWARMING

Signal -- · threshold 550 fixed

Latest PTT--milliseconds
Rolling median--last 20 accepted pairs
Accepted0quality + timing pass
Rejected / unmatched0 / 0never carried into next cycle

Upload the Pulse Transit Time sender, then connect both sensors.

WAITING No synchronized samples received A0 -- · A1 --
UNO R4 WiFi setup · upload this dedicated sketch first

Wire A0 to the proximal sensor and A1 to the distal sensor. Both sensors share 5V and GND. Upload the sketch, close Arduino Serial Monitor, then return here and connect.

The browser reads Web Serial after upload; it does not flash the board.

PulseTransitTimeWebSerial.ino · 500 samples/s · 250000 baud
/* PulseSensor Pulse Transit Time — dual-channel Web Serial sender
 * Test target: Arduino UNO R4 WiFi
 * Proximal purple wire -> A0; distal purple wire -> A1
 * Both red wires -> 5V; both black wires -> GND
 */
const int PROXIMAL_PIN = A0;
const int DISTAL_PIN = A1;
const unsigned long SAMPLE_PERIOD_US = 2000;
unsigned long nextSampleAt = 0;

void setup() {
#if defined(ARDUINO_UNOR4_WIFI)
  analogReadResolution(10);
#endif
  Serial.begin(250000);
  delay(1000);
  nextSampleAt = micros();
}

void loop() {
  const unsigned long now = micros();
  if ((long)(now - nextSampleAt) < 0) return;
  nextSampleAt += SAMPLE_PERIOD_US;
  const int proximal = analogRead(PROXIMAL_PIN);
  const int distal = analogRead(DISTAL_PIN);
  Serial.print("PTT1,");
  Serial.print(now);
  Serial.print(',');
  Serial.print(proximal);
  Serial.print(',');
  Serial.println(distal);
}
Protocol and latest frame

The dedicated sender emits PTT1,timestamp_us,proximal,distal. Other serial formats are ignored.

Latest framewaiting for PTT1 data...