Пример #1
0
		private async void Setup() {
			this.mainboard = await GT.Module.CreateAsync<GTM.FEZCream>();
			this.ledStrip = await GT.Module.CreateAsync<GTM.LEDStrip>(this.mainboard.GetProvidedSocket(4));
			this.button = await GT.Module.CreateAsync<GTM.Button>(this.mainboard.GetProvidedSocket(3));

			this.ProgramStarted();
		}
Пример #2
0
 private void _button_Released(GTM.Button sender, object args)
 {
     if (this.ButtonPressed != null)
     {
         Debug.WriteLine("Button released");
         this.ButtonPressed(this, new EventArgs());
     }
 }
Пример #3
0
        private async void Setup()
        {
            this.mainboard = await GT.Module.CreateAsync <GTM.FEZCream>();

            this.ledStrip = await GT.Module.CreateAsync <GTM.LEDStrip>(this.mainboard.GetProvidedSocket(4));

            this.button = await GT.Module.CreateAsync <GTM.Button>(this.mainboard.GetProvidedSocket(3));

            this.ProgramStarted();
        }
 public async Task Initialize()
 {
     _mainboard = await GT.Module.CreateAsync<GTM.FEZCream>();
     _button = await GT.Module.CreateAsync<GTM.Button>(this._mainboard.GetProvidedSocket(3));
     _button.Released += _button_Released;
     _relays[0] = await GT.Module.CreateAsync<PGTM.RelayX1>(_mainboard.GetProvidedSocket(4));
     _relays[1] = await GT.Module.CreateAsync<PGTM.RelayX1>(_mainboard.GetProvidedSocket(8));
     SetButtonLed(false);
     SetRelay(0, false);
     SetRelay(1, false);
 }
Пример #5
0
        public async Task Initialize()
        {
            _mainboard = await GT.Module.CreateAsync <GTM.FEZCream>();

            _button = await GT.Module.CreateAsync <GTM.Button>(this._mainboard.GetProvidedSocket(3));

            _button.Released += _button_Released;
            _relays[0]        = await GT.Module.CreateAsync <PGTM.RelayX1>(_mainboard.GetProvidedSocket(4));

            _relays[1] = await GT.Module.CreateAsync <PGTM.RelayX1>(_mainboard.GetProvidedSocket(8));

            SetButtonLed(false);
            SetRelay(0, false);
            SetRelay(1, false);
        }