Beispiel #1
0
        public async void StartServer(WeatherShield shield, WeatherData data)
        {
            await sock.BindServiceNameAsync(defaultPort.ToString());

            weatherShield = shield;
            weatherData   = data;
        }
Beispiel #2
0
        public MainPage()
        {
            InitializeComponent();
            shield = new WeatherShield("I2C1", 6, 5);
            ReadySet();

            client = DeviceClient.CreateFromConnectionString(
                "MYCONNECTIONSTRING", TransportType.Http1);

            DispatcherTimer timer = new DispatcherTimer();

            timer.Interval = TimeSpan.FromSeconds(30);
            timer.Tick    += async(o, i) =>
            {
                Go(null, null);
                await SendMessageAsync();
            };
            timer.Start();
        }
 public MainPage()
 {
     InitializeComponent();
     shield = new WeatherShield("I2C1", 6, 5);
     ReadySet();
 }
 public async void StartServer(WeatherShield shield, WeatherData data)
 {
     await sock.BindServiceNameAsync(defaultPort.ToString());
     weatherShield = shield;
     weatherData = data;
 }