private void instantiateModule(Module module, ModuleInfo info)
        {
            if (info.Present())
            {
                switch (module)
                {
                case SWITCH:
                    persistent.modules.Add(typeof(ISwitch).FullName, new Switch(bridge));
                    break;

                case LED:
                    persistent.modules.Add(typeof(ILed).FullName, new Led(bridge));
                    break;

                case ACCELEROMETER:
                    IAccelerometer accelerometer = null;

                    switch (info.implementation)
                    {
                    case AccelerometerMma8452q.IMPLEMENTATION:
                        accelerometer = new AccelerometerMma8452q(bridge);
                        persistent.modules.Add(typeof(IAccelerometerMma8452q).FullName, accelerometer);
                        break;

                    case AccelerometerBmi160.IMPLEMENTATION:
                        accelerometer = new AccelerometerBmi160(bridge);
                        persistent.modules.Add(typeof(IAccelerometerBosch).FullName, accelerometer);
                        persistent.modules.Add(typeof(IAccelerometerBmi160).FullName, accelerometer);
                        break;

                    case AccelerometerBma255.IMPLEMENTATION:
                        accelerometer = new AccelerometerBma255(bridge);
                        persistent.modules.Add(typeof(IAccelerometerBosch).FullName, accelerometer);
                        persistent.modules.Add(typeof(IAccelerometerBma255).FullName, accelerometer);
                        break;
                    }

                    if (accelerometer != null)
                    {
                        persistent.modules.Add(typeof(IAccelerometer).FullName, accelerometer);
                    }
                    break;

                case TEMPERATURE:
                    persistent.modules.Add(typeof(ITemperature).FullName, new Temperature(bridge));
                    break;

                case GPIO:
                    persistent.modules.Add(typeof(IGpio).FullName, new Gpio(bridge));
                    break;

                case NEO_PIXEL:
                    persistent.modules.Add(typeof(INeoPixel).FullName, new NeoPixel(bridge));
                    break;

                case IBEACON:
                    persistent.modules.Add(typeof(IIBeacon).FullName, new IBeacon(bridge));
                    break;

                case HAPTIC:
                    persistent.modules.Add(typeof(IHaptic).FullName, new Haptic(bridge));
                    break;

                case DATA_PROCESSOR:
                    persistent.modules.Add(typeof(IDataProcessor).FullName, new DataProcessor(bridge));
                    break;

                case EVENT:
                    persistent.modules.Add(typeof(Event).FullName, new Event(bridge));
                    break;

                case LOGGING:
                    persistent.modules.Add(typeof(ILogging).FullName, new Logging(bridge));
                    break;

                case TIMER:
                    persistent.modules.Add(typeof(Timer).FullName, new Timer(bridge));
                    break;

                case SERIAL_PASSTHROUGH:
                    persistent.modules.Add(typeof(ISerialPassthrough).FullName, new SerialPassthrough(bridge));
                    break;

                case MACRO:
                    persistent.modules.Add(typeof(IMacro).FullName, new Macro(bridge));
                    break;

                case GSR:
                    break;

                case SETTINGS:
                    persistent.modules.Add(typeof(ISettings).FullName, new Settings(bridge));
                    break;

                case BAROMETER:
                    IBarometerBosch barometer = null;

                    switch (info.implementation)
                    {
                    case BarometerBmp280.IMPLEMENTATION:
                        barometer = new BarometerBmp280(bridge);
                        persistent.modules.Add(typeof(IBarometerBmp280).FullName, barometer);
                        break;

                    case BarometerBme280.IMPLEMENTATION:
                        barometer = new BarometerBme280(bridge);
                        persistent.modules.Add(typeof(IBarometerBme280).FullName, barometer);
                        break;
                    }

                    if (barometer != null)
                    {
                        persistent.modules.Add(typeof(IBarometerBosch).FullName, barometer);
                    }
                    break;

                case GYRO:
                    persistent.modules.Add(typeof(IGyroBmi160).FullName, new GyroBmi160(bridge));
                    break;

                case AMBIENT_LIGHT:
                    persistent.modules.Add(typeof(IAmbientLightLtr329).FullName, new AmbientLightLtr329(bridge));
                    break;

                case MAGNETOMETER:
                    persistent.modules.Add(typeof(IMagnetometerBmm150).FullName, new MagnetometerBmm150(bridge));
                    break;

                case HUMIDITY:
                    persistent.modules.Add(typeof(IHumidityBme280).FullName, new HumidityBme280(bridge));
                    break;

                case COLOR_DETECTOR:
                    persistent.modules.Add(typeof(IColorTcs34725).FullName, new ColorTcs34725(bridge));
                    break;

                case PROXIMITY:
                    persistent.modules.Add(typeof(IProximityTsl2671).FullName, new ProximityTsl2671(bridge));
                    break;

                case SENSOR_FUSION:
                    persistent.modules.Add(typeof(ISensorFusionBosch).FullName, new SensorFusionBosch(bridge));
                    break;

                case DEBUG:
                    persistent.modules.Add(typeof(IDebug).FullName, new Debug(bridge));
                    break;
                }
            }
        }
        public async override Task SetUp()
        {
            await base.SetUp();

            barometer = metawear.GetModule <IBarometerBosch>();
        }
        public override void SetUp()
        {
            base.SetUp();

            barometer = metawear.GetModule <IBarometerBosch>();
        }