You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
785 B
28 lines
785 B
package de.games.nanoleaf.server;
|
|
|
|
import io.github.rowak.nanoleafapi.Aurora;
|
|
|
|
public class NanoleafPanelExample {
|
|
public static void main(String[] args) {
|
|
// Ersetze die IP-Adresse und den API-Schlüssel durch deine eigenen Werte
|
|
String ip = "DEINE_AURORA_IP";
|
|
int port = 16021;
|
|
String accessToken = "DEIN_API_KEY";
|
|
|
|
try {
|
|
// Verbindung zur Aurora-Instanz herstellen
|
|
Aurora aurora = new Aurora(ip, port, accessToken);
|
|
|
|
// Panel 1 auf Rot setzen
|
|
aurora.setPanelColor(1, 255, 0, 0, 1); // r, g, b, alpha
|
|
|
|
// Panel 2 auf Grün setzen
|
|
aurora.setPanelColor(2, 0, 255, 0, 1); // r, g, b, alpha
|
|
} catch (Exception e) {
|
|
// TODO: handle exception
|
|
}
|
|
|
|
|
|
}
|
|
}
|