.NET Micro Framework

.NET Micro Framework FEZ Robot & FEZ Panda II

By 25th March 2012 One Comment

I’ve been working on my .NET Micro Framework controller for a piece of coursework at university. As I may have said in a previous blog post, we’ve been set a task to create a robot and a controller which sends the data of a serial port. Rob was hoping to get it to send the data of IR but he had a few problems so he found it easier with serial.

The controller sends commands to the robot and the receives some information back depending on the task. If the temperature button is pressed, the TEMP command is sent to the robot over the serial port and it receives the temperature back over the serial port from the robot. The up, down, left and right buttons send commands to the robot to move it in a certain direction.

By customising the FEZ’s installed software to make the LCD work, I managed to get custom fonts to display on the screen. The font that I used is the Segoe UI font which is similar to the Segoe font used on Windows Phone devices.

Another added feature which goes beyond the core specification of the coursework is a web server which runs through the Panda II. I created web pages using Dreamweaver which displays information from the controller such as the temperature, the motors speeds and much more. The web pages themselves are really simple. I created a HTML classes which read in HTML files from the Micro SD card in the board and then processes the data. It then looks for a tilda (~) and assigns data to it. Once it has processed all the data, it then saves the HTML file back onto the SD card. The HTML files are accessed through an IP address which is hard coded into the program. Although in a real life situation, this would need to acquire it’s own IP address so I implemented this.
When the controller is connected to a local network it acquires an IP address much like a new computer connecting to a network would, i.e. 192.168.0.15 becomes the controllers IP

I have had a small problem at the moment though. The memory on the board is very limited, so processing some of the data is causing a System.OutOfMemoryException exception. I’ve done error handling though, so this happening doesn’t cause the controller to crash. I’m going to have to see where all the memory is being taken up.

The best part of this, is that the user who is playing with the robot can view all of this information on any device connected to the internet. I’ve designed the website to detect which device it is being viewed on and it arranges the information accordingly.

I hope to get it all finished quite soon, although I can see myself playing more and more with the device.

Author James Croft

James is a .NET developer for Black Marble Ltd. with over 5 years app development experience in Microsoft platforms. He enjoys blogging, helping others learn to code, making YouTube videos, spending time with his girlfriend but most of all, penguins.

More posts by James Croft

Join the discussion One Comment

Leave a comment