L3DGEWorld is a tool for monitoring and interacting with networks and computer systems. Within a 3D world, entities bounce, spin, scale and otherwise change. These entities all represent an entity in another context - be it a server, phone, router or other monitorable device. The visual transformations represent various characteristics of these entities, such as packets per second, CPU load, memory usage or temperature. The use of visual characteristics to represent important metrics allows an administrator to quickly see an overview of their systems, and especially whether there are any anomalies.

Input and output is taken to/from daemons using l3dgecomm. Previously, it has been used to monitor UPS systems, super computers and Asterisk, as well as its original implementation, monitoring greynets.

arduino-l3dgecomm allows for an all-new type of input and output to L3DGEWorld, implementing l3dgecomm for the Arduino. Monitor and interact with the real world from within a 3D game world! This page aims to demonstrate some example use cases of arduino-l3dgecomm and document how to use it.

Download arduino-l3dgecomm from the L3DGEWorld downloads page

Tutorial

For a tutorial on how to set up an Arduino and L3DGEWorld environment to replicate these examples, visit the l3dgecomm tutorial page.

Example usage

Temperature monitoring

It is trivial for the Arduino to monitor temperature. With a merely a thermistor and a resistor to form a voltage divider, the analog in functionality of the Arduino can tell the temperature.

With this, you can cheaply monitor your data centre's temperatures, see how hot rooms in your house are, or monitor plants in your greenhouse.

L = new l3dgecomm( l3dgeIP, l3dgePort ); char buf[20]; sprintf(buf, "%i", analogRead(0)); L->sendUpdate(1,L3DGE_METRIC_SPIN, L3DGE_FIELD_RATE, buf);


Example wiring of a thermistor input

Light monitoring

Likewise, identical code and wiring can be used to utilise light as an input. Perhaps it could be a very basic system for seeing if certain rooms are occupied, or to catch the office thief taking food from the fridge.

In the following video, we assume that a normal state is darkness (finger over the sensor). When someone turns the lights on (removes the finger), an alert state happens, and the L3DGE node spins really fast. a

Movement monitoring

Movement sensors are relatively cheap, touch sensors even more so. Present yourself a visual overview of which critical rooms in your office have people in them and which doors are left open. Both touch and movement sensors present themselves as a digital signal, allowing for high inputs-per-Arduino density.

L = new l3dgecomm( l3dgeIP, l3dgePort ); char buf[20]; buf = digitalRead( inPin ) == HIGH ? "100" : "0" ; L->sendUpdate(1,L3DGE_METRIC_SPIN, L3DGE_FIELD_RATE, buf);

circuit for a door sensor
An example digital input circuit diagram

Communicate with other embedded devices

Arduino knows how to talk the protocols that other embedded devices uses. SPI, I2C, etc. Extract information from these other sources for your monitoring needs.

Feedback from L3DGEWorld

arduino-l3dgecomm also offers the ability to be a l3dgecomm output daemon. This means that interactions within the game environment can trigger actions on the Arduino. Connect servos, relays and lights to your Arduino, and control them by shooting in-game objects. Open and close doors, turn your TV on and off, and turn off that light you left on, all from the comfort of a 3D virtual environment.

For example, expanding upon the thermistor example, if you notice that your room is getting too warm, you could 'shoot' the room and trigger a fan turning on.

L3DGEWorld provides different 'tools', so you can even do different interactions with an object. One tool could turn on the entity and another could turn it off, or you could alter the colour of a warning sign based on the tool used.

L = new l3dgecomm( l3dgeIP, l3dgePort ); Action * act; while (act = L->checkPackets()) { if (act->toolId == 1 && act->entityId == 4 ) digitalWrite( relayPin, HIGH ); }

You can control a large number of outputs with a single Arduino device. There is a large variety in the number of output pins of Arduino models. The Arduino Uno, for instance, has only 14 digital I/O ports, while the Arduino Mega 2560 has 54. For even more, shift registers or a communcation bus such as I2C could be used. For a list of options, Wikipedia has a list of Arduino and Arduino compatible devices.