private void ReadProximity() { DoWork = true; while (DoWork) { var Event = new ProximtyEventArgs { Proximity = Proximity.Item1, RawValue = Proximity.Item2 }; ProximityReading(this, Event); } }
static void sensor_ProximityReading(object sender, ProximtyEventArgs e) { var sensor = (VCNL4000)sender; OutputValue(e.Proximity, "Proximity Reading"); OutputValue(e.RawValue, "Proximity Raw Value"); }