package de.ctdo.crashtest;

import de.ctdo.crashtest.domotics.BuntiClient;
import de.ctdo.crashtest.domotics.IBuntiClient;
import de.ctdo.crashtest.domotics.IRelaisboard;
import de.ctdo.crashtest.domotics.Relaisboard;
import de.ctdo.crashtest.mpd.IMPDController;
import de.ctdo.crashtest.mpd.MPDController;



public class TestClass {



    public static void main(String args[]) throws InterruptedException {

        //IRelaisboard relaisboard = new Relaisboard("/dev/ttyUSB0");
        //relaisboard.open();
        //relaisboard.close();

        IBuntiClient bunti = new BuntiClient("bunti.ctdo.de", 8080);

        for(int i = 0; i < 10; i++) {
            bunti.setPar56(0, 255,   0,   0);
            bunti.setPar56(1,   0, 255,   0);
            bunti.setPar56(2,   0, 255,   0);
            bunti.setPar56(3, 255,   0,   0);
            Thread.sleep(500);
            bunti.setPar56(0,   0,   0, 255);
            bunti.setPar56(1, 255, 255,   0);
            bunti.setPar56(2, 255, 255,   0);
            bunti.setPar56(3,   0,   0, 255);
            Thread.sleep(500);
            bunti.setPar56(0, 255, 128,   0);
            bunti.setPar56(1,   0, 255, 255);
            bunti.setPar56(2,   0, 255, 255);
            bunti.setPar56(3, 255, 128,   0);
            Thread.sleep(500);
            bunti.setPar56(0,   0, 255, 255);
            bunti.setPar56(1,   0, 255,   0);
            bunti.setPar56(2,   0, 255,   0);
            bunti.setPar56(3,   0, 255, 255);
            Thread.sleep(500);
        }

    }

}
