- Netduino Forums
- → Veetrik's Content
Veetrik's Content
There have been 12 items by Veetrik (Search limited from 29-March 23)
#12126 Netduino Plus Sold Out
Posted by Veetrik on 15 April 2011 - 05:03 PM in Netduino Plus 2 (and Netduino Plus 1)
#12888 MicroServer
Posted by Veetrik on 06 May 2011 - 03:51 AM in Project Showcase
Attached Files
- MicroServer.zip 12.2KB 155 downloads
#12938 LCD question
Posted by Veetrik on 08 May 2011 - 03:28 AM in General Discussion
#12939 LCD question
Posted by Veetrik on 08 May 2011 - 03:30 AM in General Discussion
#12947 MicroServer
Posted by Veetrik on 08 May 2011 - 02:46 PM in Project Showcase
Attached Files
- mUpdate1.htm 3.9KB 91 downloads
#13210 PanAndTilt
Posted by Veetrik on 13 May 2011 - 04:01 AM in Project Showcase
This project is used to control a webcam's orientation from any web browser. I developed this so that I could monitor my back yard remotely (via VNC while at work) to see what animal(s) are eating my plants.
The project hardware consists of two servos for controlling the pan and tilt of a webcam by the Netdunio+. The Netduino accepts commands via the network and moves the appropriate servo using the Servo_API from Chris Seto. It uses pins 9 and 10 for the servos. Make sure that you hook the Netduino via the power jack to a 9v brick since the USB connector can not supplied the required current for the servos.
The commands are sent from any browser by using the Netduino+ IP address (e.c: http://192.168.0.104) followed by /PanTilt.htm as the URL. In my setup I use: http://192.168.0.104/PanTilt.htm.
PanTilt.htm is a small HTML file that resides on the Netduino+ SD card. It displays arrows for controlling the camera position. When you press on the left arrow, the browser send a 'L' to the netduino via Javascript. The Netduino+ PantAndTilt application (which is a modification of my MicroServer application) server the page of the SD card and translate the commands, in this case into a 'left' command for the servo that controls the x-axis. There are commands for up, down, left, right and center.
I got the following Parts from SparkFun for this project:
Servo - Medium (ROB-10333)
Pan/Tilt Bracket (ROB-10335)
I believe SparkFun recommends the smaller servos for the bracket, but I was able use the
medium servos. You will need to play around with the servos, especially the one for the Y-axix (tilt) to make sure the alignment is straight one the application starts the servo's at the default 90 degrees.
Make sure you copy the contents of the web folder to the root directory of the SD card before testing the application. Good luck finding those animals!
Attached Files
- PanAndTilt.zip 11.38KB 109 downloads
#13237 PanAndTilt
Posted by Veetrik on 13 May 2011 - 04:15 PM in Project Showcase
#13287 PanAndTilt
Posted by Veetrik on 14 May 2011 - 05:28 PM in Project Showcase
The thing about servos is that they use the +V pin for most of their current, the pulse pin seems to draw a small amount.
http://www.youtube.com/watch?v=W1WQ3EzciOA
#13532 SkyNet
Posted by Veetrik on 22 May 2011 - 11:52 PM in Project Showcase
and passes them to the Netduino to control the position of a webcam.
It is similar to the SkyDuino project by Hari Wiguna for the Arduino.
After creating the Pan and Tilt project for the Netduino, I was using VNC to remotely to view my home (host) PC from my office (remote). I used a webcam viewer to see the webcam image and a web browser to send the commands on the host PC.
I thought it will would really nice to simplify this by viewing the image and controlling the webcam remotely using only one application. Skype seem like a good canidate for this.
To use this you will need two Skype accounts. The first account is for the host PC where Netduino is located.
Skype needs to be set up to automatically answer calls and to allow video calls.
The first time SkyNet is run, Skype will display 'SkyNet.exe wants to use Skype'. Select 'Allow Access' to proceed.
SkyNet is run on the host PC and it automatically starts Skype if it is not running.
It intercepts any chat messages received by Skype on the Host PC that are meant for the Netduino.
It then sends these commands to the Netduino via a socket connection. You can use the buttons on
the SkyNet form to send commands direcly to the Netduino for testing purposes. There is also
a checkbox available labeled 'Send To Netduino. You can uncheck this box if the Netduino is not connect and you wish to test SkyNet. There is also a box where you must enter the Netduino's IP address.
Code to send commands via socket to the Netduino Pan and Tilt application:
public void SendCommand(string cmd) { ... string header = "GET /PanTilt.htm?c=" + cmd + " HTTP/1.0\n"; byte[] bytes = Encoding.ASCII.GetBytes(header.ToString()); IPEndPoint remoteEP = new IPEndPoint(IPAddress.Parse(txtSkyNet.Text), 80); Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); sock.Connect(remoteEP); sock.Send(bytes); sock.Close(); ... }
On the Netduino you will need to run the Pan and Tilt which is a web server that uses these commands to control the orientation of the webcam mounted on pan and tilt servos.
On the remote PC you will use the second Skype account to make a video call to the first account.
You can use the Skype chat messaging system to send any of the following commands to the host PC:
u - up
d - down
l - left
r - right
c - center
skynet on - skynet will send commands to the Netduino
skynet off - skynet will not send commands (for debugging)
Attached Files
- SkyNetSource.zip 25.89KB 58 downloads
#13559 SkyNet
Posted by Veetrik on 23 May 2011 - 11:51 PM in Project Showcase
Very cool. Do you have a video of your project in action by any chance (YouTube)?
Thanks Chris, here's a screen shot:
and here's the video:
http://www.youtube.com/watch?v=mx-WD_sVqfE
#13737 Netduino Plus webserver Help
Posted by Veetrik on 29 May 2011 - 01:16 PM in Netduino Plus 2 (and Netduino Plus 1)
#14186 Netduino Plus webserver Help
Posted by Veetrik on 10 June 2011 - 03:35 AM in Netduino Plus 2 (and Netduino Plus 1)
Veetrik,
Thanks for your reply. I tried what you suggested, but the assembler didn't like the code.
After some investigation I found my problem in the program.cs.
There was no trap for a bad command sent from the browser.
Thanks again Gordon
That's great Gordan. by the way the could I sent you should have been:
string commandData = (rawData.Lenght >= 5) ? rawData.Substring(5, rawData.Length – 5) : "";
- Netduino Forums
- → Veetrik's Content
- Privacy Policy