Skip to content

3. Recommendations

Mikagino edited this page Jul 30, 2026 · 1 revision

Creating sensors

It is recommended to use the builder pattern and simply chain the sensor setup and keep those settings constant after the initial setup. Example:

_arsemiCore.AddSensor(new MAX30102Sensor("Heartrate"))
  .SetInterval(50)
  .AddEvent(_heartrushEventName, rb => EventCondition.BelowThreshold(rb, 50))
  .AddFilter(FilterAliases.ButterworthHighPassFilter(100, 10), "Highpass");

Events

  • You should store the event names in variables to check for this name when handling EventReceived.
  • Event conditions should not involve complex math because they are checked every time a new sample arrives.

Clone this wiki locally