ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

United Kingdom
#9  

The PushVar() and PullVar() commands are part of EZ-Script. These can save variables to the cloud which will come in handy once that part of the cloud is set up.

As for the MySQL part... my method is very crude and most likely to be poorly coded hence why I haven't written a tutorial on it yet. It works but I would say it only just works.

What I have done is this...

I have a Ubuntu based PC on the LAN which is used for a whole load of stuff but the important thing here is it is used as a MySQL Database (Server version: 5.1.61-0ubuntu0.11.04.1 (Ubuntu)) and Apache2 (PHP5).

The database has various databases and tables which everything that runs in my house logs something to, be it lamp statuses, washing machine run time, details of media in my movie library, tv shows, music etc.

This information can be pulled off with ARC through simple PHP pages using the HTTPGet() command.

Like I said, it's crude but I have some pages set up which display the latest entry in the table, for instance living room temperature. The PHP for this is as simple as;


<?php
//Set up DB
$hostname='localhost';
//mysql user name
$username='root';
//mysql user password
$password='password';
//connect to the mysql server
$ss = mysql_pconnect($hostname, $username, $password) or die(mysql_error()); 

//select a database on the mysql server
mysql_select_db('heatmiser');  

//Get Temperatures
$tempquery = mysql_query("SELECT * FROM temperatures ORDER BY time DESC LIMIT 1");
$tempresult = mysql_fetch_row($tempquery);

//Air Temp
$airtemp = $tempresult['2'];

echo $airtemp.'°C';
?>

So when I use the script command $LivingTemp = HTTPGet("http://192.168.0.107/temp.php";) the result is saved as $LivingTemp, in this case if I run it right now $LivingTemp = "22.5°C"

The same can be done for anything else in the DBs. With clever PHP coding it even tells me my favourite film, how many times I've watched it, when I last watched it, what the last song I listened to, who my favourite artist is, genre, song, album etc.

Similar is used to write to the DB. However, typically (sods law) my connection to my server has just dropped on me so I'll have to wait until later to check how I did it. I'm assuming that it's just simply a case of using the cursor.execute("insert into data(data1,data2) values (%s,%s)", (data1,data2)) command in PHP (I'm far from competent in PHP so this may not be correct).

That PHP page, let's call it datalogger.php is called in ARC with the HTTPGet() command

HTTPGet("http://192.168.0.107/datalogger.php?data1=" + $data1 + "&data2=" + $data2)

Something like that anyway. Hopefully it gives you the idea. When I get home and can check my server again (or if the dropped connection decides to fix itself - which it does from time to time, I assume it's the poor PHP code and millions of requests to the MySQL DB that causes excessive load and it just gives up) then I will post mode code.

Another way I have used is with Python and EventGhost. Run EventGhost on the PC with ARC, connect it to ARC via Telnet, have EventGhost listen to ARC and send the variables to the MySQL DB that way. (again, no code at the moment as I don't have remote access to my EventGhost stuff).

Canada
#10  

It will be interesting to see how these robots interact in real life. How do you guys feel about invasion of privacy in terms of these?

#11  

Not exactly right on topic, but does anyone else think this robot is butt-ugly?:P

looks pretty advanced though, those looks just really put me off of it

#12  

@Stika am sure some will see this as being an issue. I am sure that they operate off of wifi. These same concerns would be relevant for anyone using a webcam on a computer or a home automation or security system with a camera. Wifi has become pretty secure, so hopefully this wouldn't be too much of a concern.

@CupCakeHat I agree that they are ugly. The ability of these is pretty impressive though, and it gives us more goals to shoot for with our builds.

Canada
#13  

Let's hope the clip wasn't just CGI!

PRO
Belgium
#14  

i like the pepper robot.and soon also romeo will be released for the prize , somewhere round 4000 euro.thats very impressif low.

PRO
Belgium
#15  

stika what means not just CG!

nice