public Room(MulticolorLed lights, Display_T35 screen, Motion_Sensor motion_Sensor, MulticolorLed door, MulticolorLed curtains, Camera camera, Button door_button, Text messageText) { this.lights = lights; this.screen = screen; this.motion_Sensor = motion_Sensor; this.door = door; this.curtains = curtains; this.camera = camera; this.door_button = door_button; this.messageText = messageText; }
public CameraClass(Gadgeteer.Modules.GHIElectronics.Camera camera, Motion_Sensor motion_Sensor, Wifi wf) { this.wifi = wf; this.camera = camera; this.camera.CurrentPictureResolution = Camera.PictureResolution.Resolution160x120; this.motion_Sensor = motion_Sensor; this.motion_Sensor.Motion_Sensed += new GTM.Motion_Sensor.Motion_SensorEventHandler(motion_Sensor_Motion_Sensed); this.camera.PictureCaptured += new Camera.PictureCapturedEventHandler(camera_PictureCaptured); this.camera.DebugPrintEnabled = false; timer = new GT.Timer(sleepTime); timer.Tick += timer_Tick; }
void motion_Sensor_Motion_Sensed(Motion_Sensor sender, Motion_Sensor.Motion_SensorState state) { multicolorLed.BlinkRepeatedly(GT.Color.Red); char_Display.Clear(); char_Display.PrintString("ID yourself!"); _rfidEnabled = true; ClearTimer(); _timer = new GT.Timer(10000); _timer.Tick += new GT.Timer.TickEventHandler(timer_Tick); _timer.Start(); }
//motion sensor triggers camera snapshot void motion_Sensor_Motion_Sensed(Motion_Sensor sender, Motion_Sensor.Motion_SensorState state) { Debug.Print("motion detected"); camera.TakePicture(); }