Package cc.rober.lfslcd

Examples of cc.rober.lfslcd.CFA635


   *
   * @param args The serial port ID (i.e. "COM1"), the contrast, the backlight and a pair or green and red values for each LED (all in the range 0.0-1.0)
   */
  public static void main(String[] args) throws Exception
  {
    CFA635 cfa635 = new CFA635();
   
    // Parse command line arguments
    if (args.length != 11) {
      System.err.println("Use: TurnOffLCD portID contrast backlight g0 r0 g1 r1 g2 r2 g3 r3       Range [0,1]");
      System.exit(1);
    }
   
    try {
      cfa635.open(args[0]);
    }
    catch (Exception e) {
      System.err.println(e.getMessage());
      System.exit(1);
    }
   
    cfa635.clear();
    cfa635.setContrast(Float.parseFloat(args[1]));
    cfa635.setBacklight(Float.parseFloat(args[2]));
    cfa635.setLED(0, Float.parseFloat(args[3]), Float.parseFloat(args[4]));
    cfa635.setLED(1, Float.parseFloat(args[5]), Float.parseFloat(args[6]));
    cfa635.setLED(2, Float.parseFloat(args[7]), Float.parseFloat(args[8]));
    cfa635.setLED(3, Float.parseFloat(args[9]), Float.parseFloat(args[10]));
    cfa635.close();
  }
View Full Code Here

TOP

Related Classes of cc.rober.lfslcd.CFA635

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.