Three years ago I published this video:


And some people asked to me for a 'How to' … and well … here we go!

Arduino part

We need a Arduino. In this case I’m using a Arduino Wifi Shield.

This is all the code you will need.

With te Serial Monitor of the Arduino you can see if you are connected to the Wifi and what is your IP.


You can test if everything is working fine with curl

# Low the LED

# Hight the LED

OpenSim part

How to install:

cd opensim-

Then if you try to start opensim you will recieve this warning:

./ 5: ./ mono: not found

Let’s install Mono dependencies:

apt-get install mono-complete

And start again with:


First question is about region.

Create a user with the command 'create user'.

IMPORTANT: If you fill First with 'moncho' and Last with 'pena' your user id will be 'moncho pena'.


You can use another 'Second Life' Client but in this sample I’m using Singularity.

Thiis is the configuration of the grid.


How to login:


Ok. You are in a virtual world an you now are like a god. Create a new object. Then select, click on the tab Content and New Script.


This is the code where we are calling the “webhook” of the Arduino. We change the texture of the object everytime we touch it and we do the call to switch the led.

string texture1 = "00000000-0000-2222-3333-100000001041";//UUID of texture 1 (or inventory name if in inventorY)
string texture2= "00000000-0000-1111-9999-000000000003";//UUID of texture2
float time = 0.0;//time to sleep in seconds
integer side = ALL_SIDES;//which side to change texture on
string URL = "";
switch(string texture)
    llSetTexture(texture, side);
    currentstate = ~currentstate;//swith states

    touch_start(integer total_number)
        if(currentstate) {
            llHTTPRequest(URL + "/H", [], "" );
            llSay(0, "On");
        } else {
            llHTTPRequest(URL + "/L", [], "" );
            llSay(0, "Off");

Now if you click the object you will see a warning icon like this:


This is why you have to allow to connect OpenSim to the Arduino Shield IP. Go to the 'OpenSim.ini' and add this line:

OutboundDisallowForUserScriptsExcept =

This a new video with this sample working:


Maybe OpemSim is not a fashionable application but is fine to do tests.