示例#1
0
        /// <summary>
        /// Testing method for PulseOximeter module
        /// </summary>
        static void TestOximeter()
        {
            PulseOximeter ox = new PulseOximeter(FEZSpiderII.Socket4.SerialPortName);

            ox.ProbeAttached += (sender, e) =>
            {
                Debug.WriteLine("probe attached.");
            };
            ox.ProbeDetached += (sender, e) =>
            {
                Debug.WriteLine("probe detached.");
            };
            ox.Heartbeat += (sender, e) => { Debug.WriteLine($"SPO: {e.SPO2} ,Pulse:{e.PulseRate}"); };
            Thread.Sleep(Timeout.Infinite);
        }
示例#2
0
 /// <summary>
 /// Sets the global flag which verifys the probe is attached
 /// </summary>
 /// <param name="sender">The object that fired the event</param>
 void pulseOximeter_ProbeDetached(PulseOximeter sender)
 {
     Debug.Print("Probe Detached");
     ProbeAttached = false;
 }
示例#3
0
 /// <summary>
 /// Sets the global flag which verifys the probe is not attached
 /// </summary>
 /// <param name="sender">The object that fired the event</param>
 void pulseOximeter_ProbeAttached(PulseOximeter sender)
 {
     Debug.Print("Probe Atttached, begining to take vitals");
     ProbeAttached = true;
 }
示例#4
0
 /// <summary>
 /// Checks if the probe is attached, if it is, the reading object is used to set the currentReading object
 /// and led is pulsed also to show the user that the pulse is being read
 /// </summary>
 /// <param name="sender">The object that fired the event</param>
 /// <param name="reading">The reading taken by the object</param>
 void pulseOximeter_Heartbeat(PulseOximeter sender, PulseOximeter.Reading reading)
 {
     PulseDebugLED();
     if (ProbeAttached)
     {
         CurrentReading.Init(reading);
         lED7R.Animate(reading.PulseRate, true, true, false);
         Debug.Print("heartrate: " + reading.PulseRate + " SPO2 " + reading.SPO2 + " signal " + reading.SignalStrength);
         Debug.Print("Serialised string :" + CurrentReading.SerialiseBpm());
     }
 }
示例#5
0
 void pulseOximeter_Heartbeat(PulseOximeter sender, PulseOximeter.Reading reading)
 {
     lED7R.Animate(50, true, true, false);
     DisplayPulseRate(reading.PulseRate);
 }
示例#6
0
 void pulseOximeter_Heartbeat(PulseOximeter sender, PulseOximeter.Reading reading)
 {
     lED7R.Animate(50, true, true, false);
     DisplayPulseRate(reading.PulseRate);
 }
示例#7
0
 public void Init(PulseOximeter.Reading Reading)
 {
     m_BPM = Reading.PulseRate;
 }