docs: public static void main(String[] args) throws UnsupportedBusNumberException, IOException {
  
  		// initialize bus
  		final I2CBus bus = I2CFactory.getInstance(I2CBus.BUS_1);
  		try {
  
  			final MicrochipPotentiometer a = new MCP4641(
  					bus, false, false, false, MicrochipPotentiometerChannel.A, MicrochipPotentiometerNonVolatileMode.VOLATILE_ONLY);
  			final MicrochipPotentiometer b = new MCP4641(
  					bus, false, false, false, MicrochipPotentiometerChannel.B, MicrochipPotentiometerNonVolatileMode.VOLATILE_ONLY);
  
  			// Check device-status
  			final MicrochipPotentiometerDeviceStatus aStatus = a.getDeviceStatus();
  			System.out.println("WiperLock for A active: " + aStatus.isWiperLockActive());
  			final MicrochipPotentiometerDeviceStatus bStatus = b.getDeviceStatus();
  			System.out.println("WiperLock for B active: " + bStatus.isWiperLockActive());
  
  			// print current values
  			System.out.println("A: " + a.getCurrentValue()
  					+ "/" + a.updateCacheFromDevice());
  			System.out.println("B: " + b.getCurrentValue()
  					+ "/" + b.updateCacheFromDevice());
  
  			// for about 3 seconds
  
  			for (int i = 0; i < MCP4641.maxValue() / 2; ++i) {
  
  				// increase a
  				a.increase();
  
  				// decrease b
  				b.decrease();
  
  				// wait a little bit
  				try {
  					Thread.sleep(24); // assume 1 ms for I2C-communication
  				} catch (InterruptedException e) {
  					// never mind
  				}
  
  			}
  
  			// print current values
  			System.out.println("A: " + a.getCurrentValue()
  					+ "/" + a.updateCacheFromDevice());
  			System.out.println("B: " + b.getCurrentValue()
  					+ "/" + b.updateCacheFromDevice());
  
  			// 5 seconds at 26 steps
  			boolean aDirectionUp = false;
  			boolean bDirectionUp = true;
  			final int counter1 = 5 * 26;
  			for (int i = 0; i < counter1; ++i) {
  
  				// change wipers
  				if (aDirectionUp) {
  					a.increase(10);
  				} else {
  					a.decrease(10);
  				}
  				if (bDirectionUp) {
  					b.increase(10);
  				} else {
  					b.decrease(10);
  				}
  
  				// reverse direction
  				if ((aDirectionUp && (a.getCurrentValue() == a.getMaxValue()))
  						|| (!aDirectionUp && (a.getCurrentValue() == 0))) {
  					aDirectionUp = !aDirectionUp;
  				}
  				if ((bDirectionUp && (b.getCurrentValue() == b.getMaxValue()))
  						|| (!bDirectionUp && (b.getCurrentValue() == 0))) {
  					bDirectionUp = !bDirectionUp;
  				}
  
  				// wait a little bit
  				try {
  					Thread.sleep(39); // assume 1 ms for I2C-communication
  				} catch (InterruptedException e) {
  					// never mind
  				}
  
  			}
  
  			// 5 seconds at 2 steps
  			Random randomizer = new Random(System.currentTimeMillis());
  			int counter2 = 5 * 2;
  			for (int i = 0; i < counter2; ++i) {
  
  				int nextA = randomizer.nextInt(MCP4641.maxValue() + 1);
  				a.setCurrentValue(nextA);
  
  				int nextB = randomizer.nextInt(MCP4641.maxValue() + 1);
  				b.setCurrentValue(nextB);
  
  				// wait a little bit
  				try {
  					Thread.sleep(499); // assume 1 ms for I2C-communication
  				} catch (InterruptedException e) {
  					// never mind
  				}
  
  			}
  
  			// print current values
  			System.out.println("A: " + a.getCurrentValue()
  					+ "/" + a.updateCacheFromDevice());
  			System.out.println("B: " + b.getCurrentValue()
  					+ "/" + b.updateCacheFromDevice());
  
  			// set non-volatile wipers to random values
              ((MCP4641)a).setNonVolatileMode(MicrochipPotentiometerNonVolatileMode.VOLATILE_AND_NONVOLATILE);
  			int nextA = randomizer.nextInt(MCP4641.maxValue() + 1);
  			a.setCurrentValue(nextA);
  			int nextB = randomizer.nextInt(MCP4641.maxValue() + 1);
  			b.setCurrentValue(nextB);
  
  		} finally {
  
  			try {
  				bus.close();
  			} catch (Throwable e) {
  				e.printStackTrace();
  			}
  
  		}
  
  	}