public Motor(Gadgeteer.Modules.GHIElectronics.MotorDriverL298 motorDriverL298, BreakOut breakOut) { this.motorDriverL298 = motorDriverL298; this.breakOut = breakOut; this.lastAction = 0; this.counter = 0; this.moveTimer.Tick += new Gadgeteer.Timer.TickEventHandler(moveTimer_Tick); this.stopTimer.Tick += new Gadgeteer.Timer.TickEventHandler(stopTimer_Tick); }
public Motor(MotorDriverL298 motorDriverL298, BreakOut breakOut, MulticolorLED multicolorLED2) { // TODO: Complete member initialization this.motorDriverL298 = motorDriverL298; this.breakOut = breakOut; this.multicolorLED2 = multicolorLED2; this.lastAction = 0; this.counter = 0; this.moveTimer.Tick += new Gadgeteer.Timer.TickEventHandler(moveTimer_Tick); this.stopTimer.Tick += new Gadgeteer.Timer.TickEventHandler(stopTimer_Tick); }
void ProgramStarted() { //event handlers button.ButtonPressed += new Button.ButtonEventHandler(button_ButtonPressed); button.ButtonReleased += new Button.ButtonEventHandler(button_ButtonReleased); camera.PictureCaptured += new Camera.PictureCapturedEventHandler(camera_PictureCaptured); wifiRS21.NetworkUp += new GTM.Module.NetworkModule.NetworkEventHandler(wifi_NetworkUp); wifiRS21.NetworkDown += new GTM.Module.NetworkModule.NetworkEventHandler(wifi_NetworkDown); //client client = new Client(multicolorLED2); // client.ConnectionEnd += c_ConnectionEnd; //network network = new Network(); network.initWIFI(wifiRS21); //threads // CheckStopThread = new Thread(checkStopCondition); // CheckSensorThread = new Thread(checkSensor); //init operation currentOperation = "NULL"; //leds multicolorLED.TurnRed(); //network off multicolorLED2.TurnRed(); //no operation executed //timers timer = new GT.Timer(10); //timer.Tick += operation_timer; //pictures picture = new Picture(multicolorLED2); //breakout breakOut = new BreakOut(); //motor motor = new Motor(motorDriverL298, breakOut, multicolorLED2); //flags isChecking = false; isTakingPicture = false; }