Web based interface for non-web application

AnnihilationRob

Baseband Member
Messages
34
I recently got into robotics and I am interested in making a website that allows a user to control a robot plugged into the web somehow. I am sure this is possible, as I have seen several security cameras that are controlled via web-based interfaces. I'm trying to do the same exact thing, I just don't know how to get javascript or a flash interface talking to the C or Java program that will likely be running the microcontroller in my robot.

Also, I am not sure if I understand this right but I have read a bit about embedded ethernet and it almost sounds like I could just store all my programming on my webpage and plug my robot straight into a router, thereby allowing 24-hour access to the robot and eliminating the need for the robot to be connected to a server. Is this right?

Thanks,
Rob

---------- Post added at 04:52 PM ---------- Previous post was at 04:34 PM ----------

Here's an one of those security camera's I mentioned: Web controlled Surveillance Camera

This guy even posted all of his code on that site (I can post some here if you don't want to click the link and download the pdf containing his code). I understand most of it, I'm just hazy on where and how the php is talking to the C. And is all this code stored on one page like he makes it seem? Or is the C code in a separate file on his PC somewhere?
 
I'm not sure if they have posted it anywhere. I'll try talking to him to see if he is willing to release some of the code. Some of it is quite confidential in their control algorithms but the basic control code should be available.

---------- Post added at 11:50 PM ---------- Previous post was at 11:45 PM ----------

I did find the information about using multiple controllers and how they are recognized so that you could actually use a mouse to control the motion. These are sample pieces of code that should run in a linux operating system after being compiled just to do some simple testing.

ftp://elex.camosun.bc.ca/mdundas/Elex233/Week10/
 
I've been studying the code from that security camera project i posted, and there is one line that is probably very important in it that I don't understand. When a button labelled "Camera On" is clicked, php runs this code:

<?php
if(isset($_POST['Camera_On']))
{
system('sudo /etc/init.d/camera start > /dev/null');
}
if(!isset($_POST['Camera_Off']))
{
system('sudo /etc/init.d/camera status');
}
?>

What is happening in the "system('sudo /etc/init..." lines?
 
I've been studying the code from that security camera project i posted, and there is one line that is probably very important in it that I don't understand. When a button labelled "Camera On" is clicked, php runs this code:

<?php
if(isset($_POST['Camera_On']))
{
system('sudo /etc/init.d/camera start > /dev/null');
}
if(!isset($_POST['Camera_Off']))
{
system('sudo /etc/init.d/camera status');
}
?>

What is happening in the "system('sudo /etc/init..." lines?

I don't pretend to understand PHP as of yet, but this is an 'if' statement that checks which command is received from the page ($_POST) and then runs the subsequent commands.

The "system('sudo /etc/init.d/camera *'" is basically telling the system (host machine or camera) to run the camera start/status scripts as a superuser (sudo = superuser do).
 
So are the start and status scripts located in /etc/init.d/camera on the server? Are they php scripts or another language?
 
The start up scripts are located in that folder, although they will usually just be shell scripts that will link to other drivers and misc. files. The actual files that execute will be C files. PHP is a web format that is able to make a link between web pages and systems, that is why it has to make a system command call.
 
You can also create a web based Interface for non web application system. For that you have create and design your desktop form in such a way that it is completely look like web page. You can also run you web application in local server also on in your PC.
 
Back
Top Bottom