|
|
#1 |
|
Baseband Member
Join Date: Mar 2010
Posts: 33
|
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? |
|
|
|
|
|
#2 |
|
Baseband Member
Join Date: Jan 2010
Location: Canada
Posts: 68
|
This might be taking what you want to the next level, but it definately will do the job, it involves the use of PHP and Javascript.
Robots at Camosun College - YouTube It's a video a friend of mine did on the project as a whole.
__________________
dIxie The hacker mindset doesn't actually see what happens on the other side. |
|
|
|
|
|
#3 |
|
Baseband Member
Join Date: Mar 2010
Posts: 33
|
That's awesome man. Any chance they've shared their code online?
|
|
|
|
|
|
#4 |
|
Baseband Member
Join Date: Jan 2010
Location: Canada
Posts: 68
|
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/
__________________
dIxie The hacker mindset doesn't actually see what happens on the other side. |
|
|
|
|
|
#5 |
|
Baseband Member
Join Date: Mar 2010
Posts: 33
|
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? |
|
|
|
|
|
#6 | |
|
Site Team
Join Date: May 2010
Location: United States
Posts: 2,335
|
Quote:
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).
__________________
No rain - no raindbows |
|
|
|
|
|
|
#7 |
|
Baseband Member
Join Date: Mar 2010
Posts: 33
|
So are the start and status scripts located in /etc/init.d/camera on the server? Are they php scripts or another language?
|
|
|
|
|
|
#8 |
|
Baseband Member
Join Date: Jan 2010
Location: Canada
Posts: 68
|
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.
__________________
dIxie The hacker mindset doesn't actually see what happens on the other side. |
|
|
|
|
|
#9 |
|
BSOD
Join Date: Jan 2012
Location: wilsondavid
Posts: 5
|
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.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|