Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misundertandings Using the library #24

Open
LIUKRAST opened this issue Dec 11, 2023 · 1 comment
Open

Misundertandings Using the library #24

LIUKRAST opened this issue Dec 11, 2023 · 1 comment

Comments

@LIUKRAST
Copy link

Hello! Been a while since you are active in this project, but i was trying to use it and would really appreaciate your help.

Basically im trying to make a java program to simulate a light and render it, controlled by Dot2 (Or any other program you reccomend). What i dont get is how to use the whole library.
I tried to make a basic setup, where i try to print all the bytes to at least see if anything changes, but i have no idea what im doing

        client = new ArtNetClient();
        client.start("0.0.0.0"); // IP Given by Dot2

        for(int i = 0; i < 100; i++) {
            byte[] data = client.readDmxData(0,0);
            System.err.println("Test: " + (data[1] & 0xFF));
            Thread.sleep(100);
        }
        client.stop();

It just prints me

dic 11, 2023 6:01:09 PM ch.bildspur.artnet.ArtNetServer start
INFORMAZIONI: Art-Net server started at: 0.0.0.0:6454

Not any of the bytes ever change even though im changing values on Dot2. Is there some kind of wiki to understand how this library works?

@ricardoscholz
Copy link

ricardoscholz commented Dec 11, 2023

Hey!

(Edit: just had a look at documentation)

I'd guess "readDmxData(x, y)" reports to x being the subnet and y being the universe to read. Is that right? Are you sure Dot2 is writing to the same universe you are reading?

In addition, not sure if it's going to help, but I'd start checking if System.err.println is printing in the console output. Also, it seems that line "System.err.println("Test: " + data[1] & 0xFF));" could be "System.out.println("Test: " + data[i] & 0xFF);" (out instead of err, i instead of 1").

Unfortunately, I ended up not using ArtNetClient, so I can't help with specific issues as I don't know the library details. =/

Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants