Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Server API

Kristian Skov edited this page Aug 24, 2018 · 19 revisions

A new feature is a server API, so that you can make a program yourself, that can use the features of ArduLED.

Server Settings

Error Loading Image

The server settings window is really just a console, where you can start and stop the server. As well as making the server start by it self on startup of ArduLED. The IP address can also be changed if desired, however the default should work in most cases.

Test Program

With this new API, a test program have been added (under Source Code) where you can manually send commands to ArduLED, just so you can se how it works, and so that you have a sample of how to connect to it in your own program.

Error Loading Image

The API commands

There is a preset number of commands to choose from, wich are listed here:

Command Function
FADECOLOR(bool FromZero, int FromID, int ToID, int R, int G, int B, int FadeSpeed, int FadeFactor) bool FromZero: If the program is to first set the LEDs to RGB code 0 0 0, before sending the desired colors
int FromID: From what Software ID to start from
int ToID: To what Software ID to go to
int R: The color code for Red (0-255)
int G: The color code for Green (0-255)
int B: The color code for Blue (0-255)
int FadeSpeed: The speed in ms it take for each color jump (see the Fade Colors section for more info)
int FadeFactor: The factor of how hard to make each color jump (the value 10 would be equal to a fade factor of 0.1) (see the Fade Colors section for more info)
INDIVIDUALCOLOR(int Pin, int ID, int R, int G, int B) int Pin: The Pin on your Arduino that the LED string is connected to
int ID: What Hardware ID to use
int R: The color code for Red (0-255)
int G: The color code for Green (0-255)
int B: The color code for Blue (0-255)
VISUALIZER(bool StopVisualizer, string ConfigName) bool StopVisualizer: Tells to stop the visualizer
string ConfigName: The name of the .txt file to use as a visualizer configuration
AMBILIGHT(bool StopAmbilight, bool ShowOrHideBlocks, bool AutosetOffsets, string ConfigName) bool StopAmbilight: Tells to stop the ambilight
bool ShowOrHideBlocks: Shows or hides the blocks is set to true
bool AutosetOffsets: Autosets offsets
string ConfigName: The name of the .txt file to use as a ambilight configuration
CLICKBUTTON(string ButtonName, int ButtonID) string ButtonName: What button to press
int ButtonID: If there are more than one button with this name, then the index can be selected here (however 0 is usually a normal value to use)
SETTEXTCONTROL(string TextboxName, int TextboxID, string Text) string TextboxName: What textbox to edit
int TextboxID: If there are more than one textbox with this name, then the index can be selected here (however 0 is usually a normal value to use)
string Text: The string to put into the text field
SETTACKBARCONTROL(string TrackbarName, int TrackbarID, int Value) string TrackbarName: What trackbar to edit
int TrackbarID: If there are more than one trackbar with this name, then the index can be selected here (however 0 is usually a normal value to use)
int Value: What value to set the trackbar to
SETNUMERICCONTROL(string NumericUpDownName, int NumericUpDownID, int Value) string NumericUpDownName: What NumericUpDown to edit
int NumericUpDownID: If there are more than one NumericUpDown with this name, then the index can be selected here (however 0 is usually a normal value to use)
int Value: What value to set the NumericUpDown to
SETCOMBOBOXINDEXCONTROL(string ComboBoxName, int ComboBoxID, int Index) string ComboBoxName: What ComboBox to edit
int ComboBoxID: If there are more than one ComboBox with this name, then the index can be selected here (however 0 is usually a normal value to use)
int Index: What index to set the combobox to
Clone this wiki locally