Package com.mattibal.meshnet.devices

Examples of com.mattibal.meshnet.devices.Led1Analog2Device


      Device device = knownUniqueDevicesId.get(uniqueDeviceId);
      if(device == null){
        if(deviceType == LedTestDevice.DEVICE_TYPE){
          // TODO workaround for duplicated device type
          //device =  new LedTestDevice(uniqueDeviceId);
          device = new Led1Analog2Device(uniqueDeviceId);
        } else if(deviceType == LedLamp1Device.DEVICE_TYPE){
          device = new LedLamp1Device(uniqueDeviceId);
        } else {
          // Unknown device type
          device =  new Device(uniqueDeviceId, deviceType);
View Full Code Here


          Thread.sleep(20);
          ledDevice.setLedState(false);
          Thread.sleep(50);
        }
      } else if(device!=null && device instanceof Led1Analog2Device){
        Led1Analog2Device ledDev = (Led1Analog2Device) device;
        for(int a=0; a<50; a++){
          for(int i=0; i<255; i+=2){
            ledDev.setLedPwmState(ledTable8bit[i]);
            //Thread.sleep(10);
          }
          for(int i=255; i>0; i-=2){
            ledDev.setLedPwmState(ledTable8bit[i]);
            //Thread.sleep(10);
          }
        }
      } else {
        System.out.println("Errore get device");
View Full Code Here

TOP

Related Classes of com.mattibal.meshnet.devices.Led1Analog2Device

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.