package org.ardechelibre.Jabaztag.demo;

import ie.ucd.srg.jabaztag.Choreography;
import ie.ucd.srg.jabaztag.Jabaztag;
import ie.ucd.srg.jabaztag.LedChoregraphyAction;

public class SimpleDemo2 {

	private Jabaztag j;
	
	public SimpleDemo2(String key, String sn, String token) {
		j = new Jabaztag(key, sn, token);
	
		// create an empty choregraphy
		Choreography chr = new Choreography(10);
		
		// create an led action
		LedChoregraphyAction lca1 = new LedChoregraphyAction(0,Jabaztag.LED_CENTER, 255,0,0);
		
		// create an led action
		LedChoregraphyAction lca2 = new LedChoregraphyAction(10,Jabaztag.LED_CENTER, 0,255,0);
		
		// create an led action
		LedChoregraphyAction lca3 = new LedChoregraphyAction(20,Jabaztag.LED_CENTER, 0,0,255);
		
		// add action to the choregraphy, The order don't have importance. Actions are re-ordre by action hour
		chr.addAction(lca2);
		chr.addAction(lca1);
		chr.addAction(lca3);
		
		// send the choregraphy
		j.sendChoreogrephy(chr);

	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new SimpleDemo2(args[0],args[1],args[2]);

	}

}
