I’ve done a little tinkering with the Tigra Slider Control java sliders in a web page. The below pix is what I’ve made so far. In this setup, one would position the slider to the desired position value, and then click the set button to send the servo to that position. The web slider control is in a browser popup window to keep it compact. Next I’ll need to make the batch files to go in the cgi folder and put the 127.0.0.1 url in the page.
My old cam server computer seems to have come back to life for a while, so below is my other pan/tilt cam that uses servos for the pan/tilt.
LOL, I want a neon sign (->) like yours. That is so cool! 8)
While tinkering with my 12v MOSFET setup, I made the below html code for testing speed changes. I also connected a servo modified for continous rotation and speed and direction of rotation were controlled fairly well. This is set for a servo modified for continous rotation that is stopped when at position 1500. Different types of presets can be made to do different things if needed.
<HTML>
<HEAD>
<TITLE>SSC-32 Web Control Panel</TITLE>
</HEAD>
<BODY>
<H2>SSC-32 Web Control Panel (Continous Rotation)</H2>
Servo 4:
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1400$0D">R</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1410$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1420$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1430$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1440$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1450$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1460$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1470$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1480$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1490$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$0D">STOP</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1510$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1520$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1530$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1540$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1550$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1560$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1570$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1580$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1590$0D">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1600$0D">F</a>
<BR>
<BR>
Zoomkat 2008<BR>
</body>
</html>
Just came across another web button setup that is mouse click controlled that might be of interest. In this one when the control button is depressed using the left mouse button, a signal is sent to something, and when it is released another signal is sent to do something else. In my simple test page below, when the button is pressed and held, the servo goes to a preset position. When the button is released the servo returns to the origional preset position. This could also be used to control on/off setups for motors and such. It seems to be quicker on my local setup than thru the geocities page, but I’ll need to do some more testing. You can view the page source to see the simple setup.
web.comporium.net/~shb/mousebutton-T.htm
edit: adding the page html code
<applet code="JavaCamPush.class"
codebase="http://zoomkat.no-ip.com:88/manual"
align="baseline" width="320" height="240"
archive="JavaCamPush.jar"><param name="URL"
value="http://zoomkat.no-ip.com:83"><param name="cabbase"
value="JavaCamPush.cab"></applet><BR>
<input type="button" value="Pan Left"
onmousedown="location.href
('http://zoomkat.no-ip.com:88/cgi-bin/echoo.bat?$00$80$DC$01$80$78');"
onmouseup="location.href
('http://zoomkat.no-ip.com:88/cgi-bin/echoo.bat?$00$80$79$01$80$8C');"/>
<input type="button" value="Pan Right"
onmousedown="location.href
('http://zoomkat.no-ip.com:88/cgi-bin/echoo.bat?$00$80$21$01$80$78');"
onmouseup="location.href
('http://zoomkat.no-ip.com:88/cgi-bin/echoo.bat?$00$80$79$01$80$8C');"/>
I’m not sure why this topic is sticky, I know it’s a little old, and I don’t mean to hijack the thread, …but in case you were looking for alternative approaches and UI ideas:
I put a similar pan/tilt cam with remote control online a couple of years ago. It’s offline now, but I put up captured video and a screenshot of the UI to show how it worked. More useful, I also roughly diagrammed out the overall approach that I used based on Flash Media Server. This approach is way more complicated than would need to be for just simple pan/tilt/webcam, but the approach could support much more advanced uses.
jgstechnical.com/html/randd/roboticservo2/
[list]
- Recorded Video from WebCam
- Screenshot of Flash based UI. Moving the “button” in the grid w/ a mouse controlled the cam.
- Pictures of the pan/tilt setup.
[/list:u]
I used an old Ferrettronics servo controller for this, but I’d use an SSC-32 if doing it again.
Obviously much cooler when it’s live (as I’m sure the original cam in this thread was). I can probably get it back online if anyone really wants to see it in operation…although I’ve moved since recording the video above and the view out my new window is even more boring now.
Put it back on line, as I’d like to see it in acual operation for comparison purposes. From what I remember the flash media server is very expensive and probably overkill for something that can be done for free software wise.
I made it sticky because zoomcat went to a lot of trouble to explain how it works and it’s educational.
Cool. And agreed his post was educational. Feel free to split out my post and these few that follow to a new topic before anyone else posts in here. I probably should have done that in the first place.
“Expensive” is usually a relative term and depends on the context. At the time I built this, FMS could be had for ~$1k I think. More importantly though, the developer edition was free, though limited to 10 connections. The product line has since changed and prices have gone up. There is also now an open source solution (LGPL license) that does much of what FMS originally did. It’s called Red5, and I think it could replace FMS in the approach I described with only minimal (if any) changes. All other software related things in my approach were free…although low cost/free was not one of my goals.
As for it being overkill (or unnecessary) though, consider that this solution could scale to many simultaneous Internet viewers (thousands), where as most pan/tilt/webcam solutions won’t scale past a few users. The other really nice thing in this approach (IMO), is that it allows for easier programming of a rich GUI client using Flash/Flex.
I’ll think about how best to get it back online…though probably can’t get to it for at least a few days.
Btw… thanks for your write-up in this thread. The server cgi batch file approach you’re using is really interesting.
Conrol of a robot by more than one person at any given time would probably be a disaster for the bot, so that feature is probably unimportant. Botton is the current pricing for the flash media server (a little out of my range).
Below is some sample html code that should work with the updated ssc-32 firmware with the “stop” feature. One could make a web control panel using buttons to operate servos (pan/tilt cam, robotic arm, ROV, etc) in either direction at a controlled speed when the pan button is depressed. When the desired servo position is reached, the button is released and the servo is commanded to stop. Html buttons are a little large for my liking, but they are simple to make in a web page and in this example allow single button control of servo start/stop via a simple web interface. The free price is nice.
<input type="button" value="Pan Left"
onmousedown="location.href
('http://zoomkat.d2g.com:88/cgi-bin/ssc-32.bat?0P2200T3000');"
onmouseup="location.href
('http://zoomkat.d2g.com:88/cgi-bin/ssc-32.bat?STOP0');"/>
<input type="button" value="Pan Right"
onmousedown="location.href
('http://zoomkat.d2g.com:88/cgi-bin/ssc-32.bat?0P500T3000');"
onmouseup="location.href
('http://zoomkat.d2g.com:88/cgi-bin/ssc-32.bat?STOP0');"/>
Adobe Flash Media Interactive Server 3
Buy US$4,500
Upgrade from US$1,995
Download free Adobe Flash Media Development Server 3
I have my setup back online. It was easier than I expected to get it working again even though the code base is getting quite old. To view it, go to here and click the “Watch Live Demo” link. (If you don’t see that link, then hold shift key and click the refresh button in your browser.)
jgstechnical.com/html/randd/roboticservo2/index.html
Keep in mind that it’s running over my home-office DSL connection, so the video might be slow at times. I’ll try to keep it up and running for a few days, though might have to take it down periodically when I’m doing uploads. I had originally pointed it out my window…but then it got dark and I realized that might not make for the best demo. I’ll keep the office lights on.
Let me know once you’ve had a chance to check it out so I know that I can take back offline again.
My point in scalability was related to the video, not so much the control of it. A typical web camera solution can only support a few simultaneous video streams at best. In this solution, there is only one upload stream, and its get brokered to the Internet via the FMS which in a real environment would be running on a dedicated server with big Internet connection.
As another aside though, note that the “coordinates” of the pan-tilt are shared between all clients in real-time. (If more than one person connects at the same time, they will all see the movements made by anyone else reflected in their UI.) That’s another benefit to this approach…automatic client synchronization.
Let me know if you ever put yours online again as I would like to see it as well.
I took a look at the video and you have a good quality cam. The technical part of the streaming video is really no different than the typical web cam setup. The video frames are acquired via a java applet, and the control panel is similar to an html image map.
This is not really a “benefit” but just the way simple http connections are handled.
You probably missed the previously posted link reading the thread, so below is the test cam page link. The cam is cheap with poor video in low light, but demonstrates a setup similar to yours that can be made fairly easily and quickly for free.
I think we’re discussing at different levels. I posted my setup just to provide an example of a different approach for doing web servo control.
Fwiw, every time I access your web page with Firefox3 or IE6, I see only a static image. I noticed in the status bar of the browser there is a message like “Socket error: 2”. (screen capture) I’ve just been assuming that you’ve turned it off.
My camera is still up and running, but I’ll be taking it back offline in a few hours unless someone requests otherwise.
I just randomly checked back and saw that the link was online again, so I got to see it working and played around with it for a while. Very cool.
I also came across this page of yours:geocities.com/zoomkat/cam.htm, which I thought was great.
The computer seems to come and go on its own. The NIC in it may be going bad as both LEDs on it randomly totally go off and on. Just as an update, the below batch file put in the apache cgi-bin folder will control my servos using a URL like “http://127.0.0.1/cgi-bin/echo-s.bat?4p1500”. The # sign doesn’t travel well in an http query_string, so it is added in the batch file. Batch files seem to only send to com ports 1-9. I can operate my continous rotation servo from stop to full speed in both directions using the bottom html file on my desktop. Made with notepad and fun to tinker with.
echo-s.bat
@echo off
echo status: 204
echo.
echo.
mode com8:9600,N,8,1 >nul
echo #%QUERY_STRING% >com8
continous-s.htm
<HTML>
<HEAD>
<TITLE>SSC-32 Web Control Panel</TITLE>
</HEAD>
<BODY>
<H2>SSC-32 Web Control Panel (Continous Rotation)</H2>
Servo 4:
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1400">R</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1410">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1420">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1430">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1440">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1450">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1460">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1470">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1480">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1490">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1500">STOP</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1510">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1520">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1530">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1540">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1550">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1560">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1570">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1580">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1590">*</a>
<a href="http://127.0.0.1:80/cgi-bin/echo-s.bat?4p1600">F</a>
<BR>
<BR>
Zoomkat 2008<BR>
</body>
</html>
Below is the latest servo pan/tilt cam page. This page uses javascript to pull images from the free webcam2000 application. An imbeded iframe is used to prevent interrupting the video stream when the cam is moved. Using another iframe one probably could query dynamic info from a bot and display it below the cam controls.
Another version of web button servo control for continous rotation servos. This is using the previous Apache web server with the echoo.com and echoo.bat files in the apache cgi-bin folder. This is set for two servos on opposides of a bot driving wheels or tracks. Depress button with mouse to actuate servo(s) and release button to stop servo(s). For sustained rotation, click button, and with mouse button still depressed, move cursor off of button and then release button. Clicking S button sends stop command to servos.
LF = left servo foward
LR = left servo reverse
SL = left servo reverse and right servo foward
AF = both servos foward
S = all stop
AR = both servos reverse
SR = left servo foward and right servo reverse
RF = right servo foward
RR = right servo reverse
Edit: added buttons for slow servo rotation.
<HTML>
<HEAD>
<TITLE>SSC-32 Web Control Panel</TITLE>
</HEAD>
<BODY>
<H2>SSC-32 Web Control Panel <BR>
(Continous Rotation)</H2>
Buttons to control two servos (4 and 5).
<BR>
Code set to rotate servos that are
<BR>
on opposite sides of a bot.
<BR>
Hold button down to actuate.
<BR>
Release button to stop.
<BR>
<BR>
Slow
<BR>
<input type="button" value="LF"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1520$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$0D');"/>
<input type="button" value="LR"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1480$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$0D');"/>
<input type="button" value="SL"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1480$235P1480$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"/>
<input type="button" value="AF"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1520$235P1480$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"/>
<input type="button" value="*S*"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"/>
<input type="button" value="AR"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1480$235P1520$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"/>
<input type="button" value="SR"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1520$235P1520$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"/>
<input type="button" value="RF"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$235P1480$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$235P1500$0D');"/>
<input type="button" value="RR"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$235P1520$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$235P1500$0D');"/>
<BR>
<BR>
Fast
<BR>
<input type="button" value="LF"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1600$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$0D');"/>
<input type="button" value="LR"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1400$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$0D');"/>
<input type="button" value="SL"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1400$235P1400$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"/>
<input type="button" value="AF"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1600$235P1400$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"/>
<input type="button" value="*S*"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"/>
<input type="button" value="AR"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1400$235P1600$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"/>
<input type="button" value="SR"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1600$235P1600$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$234P1500$235P1500$0D');"/>
<input type="button" value="RF"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$235P1400$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$235P1500$0D');"/>
<input type="button" value="RR"
onmousedown="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$235P1600$0D');"
onmouseup="location.href
('http://127.0.0.1:80/cgi-bin/echoo.bat?$235P1500$0D');"/>
<BR>
<BR>
Zoomkat 2009<BR>
</body>
</html>
last night at the sushi bar a friend had a new Cricket cell phone with the ipod like touch screen. The phone has a web brouser and web access included in the $40/mo unlimited plan. I checked my script web cam pan/tilt page and was able to see the updating video and operate pan/tilt the cam. I need to borrow her phone for some more tinkering. This puts out the possibility of operating a bot from a cell phone without a lot of software/hardware overhead. Cricket also has a USB gizmo that is used with laptops/netbooks for $40/mo. Not sure if one could use this on a laptop/netbook intergrated bot for the bot end of the communication link.
Its been ~2 years since I worked on it, but now that I actually have an ssc-32, I decided to do some more tinkering with my web slider setup below. Not terribly fast, but fairly easy to setup and might be useful for operating servos on other computers. One needs to be running the apache web server on the computer connected to the ssc-32. The below slider.bat file is edited for the desired com port and baude rate, and placed in the apache cgi-bin folder. The eight2.htm file would need to be edited for the appropriate web/network paths and apache port if not testing on 127.0.0.1 and port 80. One moves the slider to the desired position, then the button click sends the position value. Something simple to tinker with if interested in controlling servos over the internet.
web.comporium.net/~shb/eight2.htm
http://web.comporium.net/~shb/pix/slider1.jpg
Edit: commented out mode in slider.bat, as only needed if pc comport normally set to a different setting than desired with the slider.
slider.bat
[code]
@echo off
echo status: 204
echo.
echo.
::mode com8:9600,N,8,1 >nul
SET sv=%query_string:~11,1%
SET ps=%query_string:~13,4%
SET xx=#%sv%p%ps%
echo %xx% >com8[/code]
Thanks
Think I will try this out, need to monitor some equipment this summer while on holiday.
Occasionally check out that webcam … still waiting for the ‘Live Nudes’ … any day now …