Building a Windows Phone controlled Wi-Fi Gadgeteer Image Streaming Robot
- Posted: Aug 10, 2012 at 6:00 AM
- 7,146 Views
- 4 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Today's Hardware Friday project is another cool project from Marco Minerva, Friend of the Blog. This project brings so many things together that it could have been called the Kitchen Sink project... ![]()
I have upgraded the .NET Gadgeteer Robot I described in the post Constructing a Bluetooth controlled Robot, replacing the Bluetooth Module with Wi-Fi and adding a camera to stream images. The result is a Robot that can be controlled by a Windows Phone application, with which it is also possible to show captured images.
Let’s start seeing the new Gadgeteer application, that uses the following modules connected to a FEZ Spider Mainboard:
- USB ClientDP;
- WiFi RS21, to allow connections to the device;
- Multicolor LED, to indicate device status;
- OLED Display, to show the IP Address of the device;
- Motor Driver L298 to control rover movements;
- Camera, to capture images.
You can see the result in following screenshot.
From hardware to the phone app, it's all covered, including the challenges he faced.
Getting and showing image streaming, instead, require a bit more work. First, we use RestSharp, a library that simplifies the process of making requests via HTTP and processing responses in an asynchronous way. But then, we have a problem: Windows Phone doesn’t support BMP format, that is used by .NET Gadgeteer camera module. So, we need a way to load images in this format and convert them in a format that Windows Phone can handle (i.e., in PNG or JPEG). For this task, we’ll use ImageTools, that is available on http://imagetools.codeplex.com.
But there is another problem: if we try to read images that come from .NET Gadgeteer camera module with ImageTools, the height property is always negative. So, the read operation causes an exception. To solve this issue, I have downloaded the source code of ImageTools and applied a little hack to the library, in order to take the positive value of height. Doing so, the image is read correctly, but it appears flipped. This is the reason for which I have applied a ScaleTransform tranformation on image object in XAML, so that it is shown in the right direction. Of course, a better approach is to modify the code that reads the bitmap, but for the moment this solution is acceptable. As always, you can find the modified version of ImageTools library in the ZIP file that comes with this article.
And of course the source is available, both used inline to explain how he built it;
As well as a the complete Visual Studio Solutions (click through for the download, at the bottom of the post).
If you're ready to create your own Wi-Fi networked and Windows Phone controlled robot head on over to the post, grab the projects and get building!
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
why don´t see you vídeo? o.O
@Diadevelophak: I'm not sure what video you mean. The Windows Phone image above is a prototype/example of the UI, there's no video intended for that snapshot. You can see a video of it working if you click through to the full article and scroll to the bottom of the post.
I think what Diadevelophak means is that the silverlight control isn't showing well :
Put V code here&hl=en">Put V code here&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355">
@Bruuteuzius: AHH... I see. Yeah, that was borked. Fixed. Thanks for pointing that out guys.
Remove this comment
Remove this thread
close