private void InitializeModules()
 {
     this.usbClientDP = new GTM.GHIElectronics.UsbClientDP(1);
     this.wifi_RS21 = new GTM.GHIElectronics.WiFi_RS21(9);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(12);
     this.button = new GTM.GHIElectronics.Button(14);
 }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            led = new GTM.GHIElectronics.MulticolorLed(4);

            ethernet = new GTM.GHIElectronics.Ethernet_J11D(7);
        }
Exemple #3
0
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            usbClient = new GTM.GHIElectronics.UsbClientDP(2);

            led = new GTM.GHIElectronics.MulticolorLed(5);
        }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            led1 = new GTM.GHIElectronics.MulticolorLed(14);

            led2 = new GTM.GHIElectronics.MulticolorLed(led1.DaisyLinkSocketNumber);
        }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            button = new GTM.GHIElectronics.Button(4);

            led = new GTM.GHIElectronics.MulticolorLed(5);
        }
Exemple #6
0
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            button = new GTM.GHIElectronics.Button(4);

            led = new GTM.GHIElectronics.MulticolorLed(5);
        }
Exemple #7
0
 private void InitializeModules()
 {
     this.breadBoard_X1 = new GTM.GHIElectronics.BreadBoard_X1(10);
     this.usbClientDP   = new GTM.GHIElectronics.UsbClientDP(1);
     this.sdCard        = new GTM.GHIElectronics.SDCard(5);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(4);
 }
Exemple #8
0
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            led = new GTM.GHIElectronics.MulticolorLed(4);

            ethernet = new GTM.GHIElectronics.Ethernet_J11D(7);
        }
 private void InitializeModules() {
     this.usbClientSP = new GTM.GHIElectronics.UsbClientSP(1);
     this.camera = new GTM.GHIElectronics.Camera(3);
     this.oledDisplay = new GTM.Seeed.OledDisplay(6);
     this.wifi = new GTM.GHIElectronics.WiFi_RS21(9);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(12);
     this.button = new GTM.GHIElectronics.Button(14);
 }
 private void InitializeModules()
 {
     this.sdCard = new GTM.GHIElectronics.SDCard(5);
     this.usbClientDP = new GTM.GHIElectronics.UsbClientDP(1);
     this.rfid = new GTM.GHIElectronics.RFID(11);
     this.led1 = new GTM.GHIElectronics.MulticolorLed(6);
     this.led2 = new GTM.GHIElectronics.MulticolorLed(this.led1.DaisyLinkSocketNumber);
     this.rs232 = new GTM.GHIElectronics.RS232(4);
 }
 private void InitializeModules()
 {
     this.usbClientDP   = new GTM.GHIElectronics.UsbClientDP(1);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(11);
     this.extender2     = new GTM.GHIElectronics.Extender(4);
     this.extender      = new GTM.GHIElectronics.Extender(this.extender2.ExtenderSocketNumber);
     this.ethernet      = new GTM.GHIElectronics.Ethernet_J11D(7);
     this.button        = new GTM.GHIElectronics.Button(8);
 }
Exemple #12
0
 private void InitializeModules()
 {
     this.usbClientSP   = new GTM.GHIElectronics.UsbClientSP(1);
     this.camera        = new GTM.GHIElectronics.Camera(3);
     this.oledDisplay   = new GTM.Seeed.OledDisplay(6);
     this.wifi          = new GTM.GHIElectronics.WiFi_RS21(9);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(12);
     this.button        = new GTM.GHIElectronics.Button(14);
 }
 private void InitializeModules() {
     this.usbClientDP = new GTM.GHIElectronics.UsbClientDP(1);
     this.usbHost = new GTM.GHIElectronics.UsbHost(3);
     this.resetButton = new GTM.GHIElectronics.Button(4);
     this.sdCard = new GTM.GHIElectronics.SDCard(5);
     this.usbSerial = new GTM.GHIElectronics.UsbSerial(8);
     this.wifi = new GTM.GHIElectronics.WiFi_RS21(9);
     this.moistureSensor = new GTM.Seeed.MoistureSensor(10);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(11);
 }
Exemple #14
0
 private void InitializeModules()
 {
     this.xBee          = new GTM.GHIElectronics.XBee(9);
     this.extender      = new GTM.GHIElectronics.Extender(11);
     this.rs485         = new GTM.GHIElectronics.RS485(this.extender.ExtenderSocketNumber);
     this.button        = new GTM.GHIElectronics.Button(4);
     this.usbClientSP   = new GTM.GHIElectronics.UsbClientSP(1);
     this.display_T35   = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(5);
 }
Exemple #15
0
 private void InitializeModules()
 {
     this.usbClientDP    = new GTM.GHIElectronics.UsbClientDP(1);
     this.usbHost        = new GTM.GHIElectronics.UsbHost(3);
     this.resetButton    = new GTM.GHIElectronics.Button(4);
     this.sdCard         = new GTM.GHIElectronics.SDCard(5);
     this.usbSerial      = new GTM.GHIElectronics.UsbSerial(8);
     this.wifi           = new GTM.GHIElectronics.WiFi_RS21(9);
     this.moistureSensor = new GTM.Seeed.MoistureSensor(10);
     this.multicolorLed  = new GTM.GHIElectronics.MulticolorLed(11);
 }
Exemple #16
0
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            temperatureHumidity = new GTM.Seeed.TemperatureHumidity(2);

            lightsensor = new GTM.GHIElectronics.LightSensor(3);

            multicolorLed = new GTM.GHIElectronics.MulticolorLed(4);

            led7r = new GTM.GHIElectronics.LED7R(7);
        }
Exemple #17
0
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            temperatureHumidity = new GTM.Seeed.TemperatureHumidity(2);

            lightsensor = new GTM.GHIElectronics.LightSensor(3);

            multicolorLed = new GTM.GHIElectronics.MulticolorLed(4);

            led7r = new GTM.GHIElectronics.LED7R(7);
        }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            usbClientDP = new GTM.GHIElectronics.UsbClientDP(1);

            led = new GTM.GHIElectronics.MulticolorLed(4);

            relays = new GTM.Seeed.Relays(12);

            pairingButton = new GTM.GHIElectronics.Button(14);
        }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            usbClientDP = new GTM.GHIElectronics.UsbClientDP(1);

            multicolorLed = new GTM.GHIElectronics.MulticolorLed(4);

            button = new GTM.GHIElectronics.Button(11);

            led7r = new GTM.GHIElectronics.LED7R(12);
        }
Exemple #20
0
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            usbHost = new GTM.GHIElectronics.UsbHost(3);

            ledSD = new GTM.GHIElectronics.MulticolorLed(4);

            ledUSB = new GTM.GHIElectronics.MulticolorLed(ledSD.DaisyLinkSocketNumber);

            sdCard = new GTM.GHIElectronics.SDCard(5);
        }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            usbHost = new GTM.GHIElectronics.UsbHost(3);

            ledSD = new GTM.GHIElectronics.MulticolorLed(4);

            ledUSB = new GTM.GHIElectronics.MulticolorLed(ledSD.DaisyLinkSocketNumber);

            sdCard = new GTM.GHIElectronics.SDCard(5);
        }
 private void InitializeModules()
 {
     this.button = new GTM.GHIElectronics.Button(11);
     this.display_TE35 = new GTM.GHIElectronics.Display_TE35(14, 13, 12, Socket.Unused);
     this.ethernet_J11D = new GTM.GHIElectronics.Ethernet_J11D(7);
     this.lightSensor = new GTM.GHIElectronics.LightSensor(10);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(8);
     this.potentiometer = new GTM.GHIElectronics.Potentiometer(9);
     this.temperatureHumidity = new GTM.Seeed.TemperatureHumidity(6);
     this.barometer = new GTM.Seeed.Barometer(4);
     this.compass = new GTM.Seeed.Compass(3);
 }
 private void InitializeModules()
 {
     this.button        = new GTM.GHIElectronics.Button(10);
     this.display       = new GTM.GHIElectronics.Display_T35(15, 16, 17, 14);
     this.usbClientDP   = new GTM.GHIElectronics.UsbClientDP(8);
     this.sdCard        = new GTM.GHIElectronics.SDCard(9);
     this.led           = new GTM.GHIElectronics.MulticolorLed(3);
     this.camera        = new GTM.GHIElectronics.Camera(6);
     this.cellularRadio = new GTM.Seeed.CellularRadio(4);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(1);
     this.button2       = new GTM.GHIElectronics.Button(13);
 }
 private void InitializeModules()
 {
     this.button              = new GTM.GHIElectronics.Button(11);
     this.display_TE35        = new GTM.GHIElectronics.Display_TE35(14, 13, 12, Socket.Unused);
     this.ethernet_J11D       = new GTM.GHIElectronics.Ethernet_J11D(7);
     this.lightSensor         = new GTM.GHIElectronics.LightSensor(10);
     this.multicolorLed       = new GTM.GHIElectronics.MulticolorLed(8);
     this.potentiometer       = new GTM.GHIElectronics.Potentiometer(9);
     this.temperatureHumidity = new GTM.Seeed.TemperatureHumidity(6);
     this.barometer           = new GTM.Seeed.Barometer(4);
     this.compass             = new GTM.Seeed.Compass(3);
 }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            usbClientDP = new GTM.GHIElectronics.UsbClientDP(1);

            motion_Sensor = new GTM.GHIElectronics.Motion_Sensor(4);

            multicolorLed = new GTM.GHIElectronics.MulticolorLed(8);

            rfid = new GTM.GHIElectronics.RFID(9);

            char_Display = new GTM.GHIElectronics.Display_HD44780(12);
        }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            camera = new GTM.GHIElectronics.Camera(3);

            button = new GTM.GHIElectronics.Button(4);

            sdCard = new GTM.GHIElectronics.SDCard(5);

            multicolorLed = new GTM.GHIElectronics.MulticolorLed(6);

            wifi_RS21 = new GTM.GHIElectronics.WiFi_RS21(9);
        }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            usbClient = new GTM.GHIElectronics.UsbClientDP(1);

            ethernet = new GTM.GHIElectronics.Ethernet_J11D(7);

            button = new GTM.GHIElectronics.Button(10);

            pulseOximeter = new GTM.Seeed.PulseOximeter(11);

            led = new GTM.GHIElectronics.MulticolorLed(12);

            lED7R = new GTM.GHIElectronics.LED7R(14);
        }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            camera = new GTM.GHIElectronics.Camera(3);

            temperatureHumidity = new GTM.Seeed.TemperatureHumidity(6);

            ethernet_J11D = new GTM.GHIElectronics.Ethernet_J11D(7);

            multicolorLed = new GTM.GHIElectronics.MulticolorLed(8);

            lightSensor = new GTM.GHIElectronics.LightSensor(9);

            display_TE35 = new GTM.GHIElectronics.Display_TE35(14, 13, 12, 10);

            button = new GTM.GHIElectronics.Button(11);
        }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            usbClientDP = new GTM.GHIElectronics.UsbClientDP(1);

            cellularRadio = new GTM.Seeed.CellularRadio(4);

            ethernet = new GTM.GHIElectronics.Ethernet_J11D(7);

            led = new GTM.GHIElectronics.MulticolorLed(8);

            lightsense = new GTM.GHIElectronics.LightSensor(9);

            temperatureHumidity = new GTM.Seeed.TemperatureHumidity(11);

            display = new GTM.GHIElectronics.Display_T35(14, 13, 12, Socket.Unused);
        }
Exemple #30
0
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            camera = new GTM.GHIElectronics.Camera(3);

            temperatureHumidity = new GTM.Seeed.TemperatureHumidity(6);

            ethernet_J11D = new GTM.GHIElectronics.Ethernet_J11D(7);

            multicolorLed = new GTM.GHIElectronics.MulticolorLed(8);

            lightSensor = new GTM.GHIElectronics.LightSensor(9);

            display_TE35 = new GTM.GHIElectronics.Display_TE35(14, 13, 12, 10);

            button = new GTM.GHIElectronics.Button(11);
        }
        private void InitializeModules()
        {
            // Initialize GTM.Modules and event handlers here.
            camera = new GTM.GHIElectronics.Camera(3);

            door_button = new GTM.GHIElectronics.Button(4);

            curtains = new GTM.GHIElectronics.MulticolorLed(5);

            door = new GTM.GHIElectronics.MulticolorLed(6);

            motion_Sensor = new GTM.GHIElectronics.Motion_Sensor(8);

            wifi_RS21 = new GTM.GHIElectronics.WiFi_RS21(9);

            screen = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10);

            lights = new GTM.GHIElectronics.MulticolorLed(11);
        }
 private void InitializeModules()
 {
     this.usbClientDP = new GTM.GHIElectronics.UsbClientDP(1);
     this.multicolorLed1 = new GTM.GHIElectronics.MulticolorLed(10);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(11);
 }
        /// <summary>
        /// Creates a HomeOS device library instance supporting assocation with HomeOS hubs, using wifi, serial or storage devices (USB host, SD card)
        /// to transfer credentials.
        /// </summary>
        /// <param name="manufacturer">A string identifying the manufacturer, e.g. "Microsoft Research"</param>
        /// <param name="deviceTypeIdentifier">A string identifying the device type, e.g. "MoistureSensor"</param>
        /// <param name="setupWifiAuthCode">The authentication code used for wifi setup networks to prove that the caller has physical access to this device (it should be written on the device)</param>
        /// <param name="wifi">The instance of the wifi module.  Cannot be null.</param>
        /// <param name="led">The instance of an LED module to show the wifi connection state.  Can be null.  The LED will not be controlled if the doNotControlLed delegate returns true.</param>
        /// <param name="display">The instance of a display module to show the wifi connection state.  Can be null.  The display will not be controlled if the doNotControlLed delegate returns true.</param>
        /// <param name="serialPort">The serial port to use to receive wifi network credentials.  Can be null.</param>
        /// <param name="doNotManageWifi">A delegate specifying when NOT to manage wifi, e.g. allowing the program to stop wifi scanning and assocation for a time.  Can be null.</param>
        /// <param name="doNotControlScreen">A delegate specifying when NOT to control the screen (i.e. if your program wants to control the screen)</param>
        /// <param name="doNotControlLed">A delegate specifying when NOT to control the led (i.e. if your program wants to control the led)</param>
        /// <param name="enableWifiSetupNetworks">Enable wifi-based discovery using "setup" network</param>
        /// <param name="doUDPDiscovery">Listens and responds to UDP packets from HomeOS trying to discover this device, over both "setup" and home networks.  If this is off, the device will still beacon periodically over UDP.  Normally leave it on.</param>
        public HomeOSGadgeteerDevice(
            string manufacturer,
            string deviceTypeIdentifier,
            string setupWifiAuthCode,

            GTM.GHIElectronics.WiFi_RS21 wifi,
            GTM.GHIElectronics.MulticolorLed led = null,
            GTM.Module.DisplayModule display     = null,
            string serialPort               = null,
            BoolDelegate doNotManageWifi    = null,
            BoolDelegate doNotControlScreen = null,
            BoolDelegate doNotControlLed    = null,

            bool enableWifiSetupNetworks = true,
            bool doUDPDiscovery          = true

            )
        {
            if (manufacturer == null)
            {
                throw new ArgumentNullException("manufacturer");
            }
            if (deviceTypeIdentifier == null)
            {
                throw new ArgumentNullException("deviceTypeIdentifier");
            }
            if (setupWifiAuthCode == null)
            {
                throw new ArgumentNullException("setupAuthCode");
            }
            if (wifi == null)
            {
                throw new ArgumentNullException("wifi");
            }
            this.wifi    = wifi;
            this.led     = led;
            this.display = display;
            if (display != null)
            {
                display.SimpleGraphics.AutoRedraw = false;
            }

            if (serialPort != null)
            {
                new Thread(() => SerialReadThread(serialPort)).Start();
            }

            this.SkipWifiTimer      = doNotManageWifi ?? defaultFalse;
            this.DoNotControlScreen = doNotControlScreen ?? defaultFalse;
            this.DoNotControlLed    = doNotControlLed ?? defaultFalse;

            this.DoUDPDiscovery     = doUDPDiscovery;
            EnableWifiSetupNetworks = enableWifiSetupNetworks;
            this.SetupAuthCode      = setupWifiAuthCode;
            this.TypeIdentifier     = deviceTypeIdentifier;
            this.Manufacturer       = manufacturer;

            wifi.Interface.NetworkInterface.EnableDhcp();
            wifi.Interface.WirelessConnectivityChanged += Interface_WirelessConnectivityChanged;
            wifi.Interface.NetworkAddressChanged       += Interface_NetworkAddressChanged;

            if (!wifi.Interface.IsOpen)
            {
                wifi.Interface.Open();
            }
            NetworkInterfaceExtension.AssignNetworkingStackTo(wifi.Interface);


            Thread thread = new Thread(DiscoveryThread);

            thread.Start();

            LoadData();

            wifiTimer       = new GT.Timer(WifiScanPeriod);
            wifiTimer.Tick += wifiTimer_Tick;
            wifiTimer.Start();

            WebServer.SetupWebEvent(webPath).WebEventReceived += new WebEvent.ReceivedWebEventHandler(CredentialsWebEventReceived);

            SetLed();
            SetScreen();

            GT.Program.BeginInvoke(new VoidDelegate(() => wifiTimer_Tick(wifiTimer)), null);
        }
 private void InitializeModules()
 {
     this.joystick = new GTM.GHIElectronics.Joystick(10);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(5);
     this.usbClientSP = new GTM.GHIElectronics.UsbClientSP(1);
 }
        /// <summary>
        /// Creates a HomeOS device library instance supporting assocation with HomeOS hubs, using wifi, serial or storage devices (USB host, SD card) 
        /// to transfer credentials.   
        /// </summary>
        /// <param name="manufacturer">A string identifying the manufacturer, e.g. "Microsoft Research"</param>
        /// <param name="deviceTypeIdentifier">A string identifying the device type, e.g. "MoistureSensor"</param>
        /// <param name="setupWifiAuthCode">The authentication code used for wifi setup networks to prove that the caller has physical access to this device (it should be written on the device)</param>
        /// <param name="wifi">The instance of the wifi module.  Cannot be null.</param>
        /// <param name="led">The instance of an LED module to show the wifi connection state.  Can be null.  The LED will not be controlled if the doNotControlLed delegate returns true.</param>
        /// <param name="display">The instance of a display module to show the wifi connection state.  Can be null.  The display will not be controlled if the doNotControlLed delegate returns true.</param>
        /// <param name="serialPort">The serial port to use to receive wifi network credentials.  Can be null.</param>
        /// <param name="doNotManageWifi">A delegate specifying when NOT to manage wifi, e.g. allowing the program to stop wifi scanning and assocation for a time.  Can be null.</param>
        /// <param name="doNotControlScreen">A delegate specifying when NOT to control the screen (i.e. if your program wants to control the screen)</param>
        /// <param name="doNotControlLed">A delegate specifying when NOT to control the led (i.e. if your program wants to control the led)</param>
        /// <param name="enableWifiSetupNetworks">Enable wifi-based discovery using "setup" network</param>
        /// <param name="doUDPDiscovery">Listens and responds to UDP packets from HomeOS trying to discover this device, over both "setup" and home networks.  If this is off, the device will still beacon periodically over UDP.  Normally leave it on.</param>
        public HomeOSGadgeteerDevice(
            string manufacturer,
            string deviceTypeIdentifier,
            string setupWifiAuthCode,

            GTM.GHIElectronics.WiFi_RS21 wifi,
            GTM.GHIElectronics.MulticolorLed led = null,
            GTM.Module.DisplayModule display = null,
            string serialPort = null,
            BoolDelegate doNotManageWifi = null,
            BoolDelegate doNotControlScreen = null,
            BoolDelegate doNotControlLed = null,

            bool enableWifiSetupNetworks = true,
            bool doUDPDiscovery = true

            )
        {
            if (manufacturer == null) throw new ArgumentNullException("manufacturer");
            if (deviceTypeIdentifier == null) throw new ArgumentNullException("deviceTypeIdentifier");
            if (setupWifiAuthCode == null) throw new ArgumentNullException("setupAuthCode");
            if (wifi == null) throw new ArgumentNullException("wifi");
            this.wifi = wifi;
            this.led = led;
            this.display = display;
            if (display != null)
            {
                display.SimpleGraphics.AutoRedraw = false;
            }

            if (serialPort != null)
            {
                new Thread(() => SerialReadThread(serialPort)).Start();
            }

            this.SkipWifiTimer = doNotManageWifi ?? defaultFalse;
            this.DoNotControlScreen = doNotControlScreen ?? defaultFalse;
            this.DoNotControlLed = doNotControlLed ?? defaultFalse;

            this.DoUDPDiscovery = doUDPDiscovery;
            EnableWifiSetupNetworks = enableWifiSetupNetworks;
            this.SetupAuthCode = setupWifiAuthCode;
            this.TypeIdentifier = deviceTypeIdentifier;
            this.Manufacturer = manufacturer;

            wifi.Interface.NetworkInterface.EnableDhcp();
            wifi.Interface.WirelessConnectivityChanged += Interface_WirelessConnectivityChanged;
            wifi.Interface.NetworkAddressChanged += Interface_NetworkAddressChanged;

            if (!wifi.Interface.IsOpen)
                wifi.Interface.Open();
            NetworkInterfaceExtension.AssignNetworkingStackTo(wifi.Interface);


            Thread thread = new Thread(DiscoveryThread);
            thread.Start();

            LoadData();

            wifiTimer = new GT.Timer(WifiScanPeriod);
            wifiTimer.Tick += wifiTimer_Tick;
            wifiTimer.Start();

            WebServer.SetupWebEvent(webPath).WebEventReceived += new WebEvent.ReceivedWebEventHandler(CredentialsWebEventReceived);

            SetLed();
            SetScreen();

            GT.Program.BeginInvoke(new VoidDelegate(() => wifiTimer_Tick(wifiTimer)), null);
        }
Exemple #36
0
 private void InitializeModules()
 {
     this.ethernet_J11D = new GTM.GHIElectronics.Ethernet_J11D(7);
     this.multicolorLed = new GTM.GHIElectronics.MulticolorLed(14);
 }