Winter break means plenty of time to toy around with something new. I’m not sure what inspired this project, perhaps the ethernet driver we designed for our Operating Systems course, but I’ve decided to explore the field of embedded networking. And you can’t get much more embedded than a 16 MHz Arduino Uno with 32K of memory.
I want to create an Arduino-based web server, but with a few twists, because the idea already exists and has been implemented. The first link points to Lady Ada’s quick and dirty Arduino file server, which can serve up character-based files stored on micro SD. The second link offers a more functional server called Webduino, which claims to offer image support (ie. binary transfers). However, reading through the code, it looks like the developer took the easy way out by re-encoding a PNG as hex values, and then sending those values byte-by-byte over the network. That’s not image support! Also, both implementations seem to suffer from the limitation that only one client can connect at a time.
Because the Arduino has no formal notion of threads, it would make sense that multiple clients just won’t work. But I’ve been reading up on a project called Protothreads, which adds the most basic threading you can imagine. No separate stacks. No pre-emptive scheduling. Just a way to give the appearance that two computations are concurrent. I’m hoping that I can use protothreading to allow multiple clients to connect.
Additionally, it would be nice to find a way to do binary transfers. Glancing at the EthernetClient and EthernetServer API, it looks like they’re both set up for byte transfers. I wonder if there’s a way I can trick it into sending binary information. We’ll see.
Update – 26 January 2012:
I found an easy way (untested) to get the Arduino to send non-text content over the EthernetClient interface. When a client requests a file of a certain type, say, PNG, you can send a response indicating that you will be sending PNG binary data byte by byte as follows:
client.println("HTTP/1.1 200 OK");
I hope to test this technique soon. Admittedly, I still have a long way to go on this project, but other projects (iPhone app, stay tuned) keep arising.
I was hired to add functionality to an existing iPhone app for Caterpillar’s tree harvesting service. The goal is to give Caterpillar the ability to track and record data about their equipment during use.
Data is stored in an Entity model using SQL Lite and the iPhone’s Core Data framework. The app follows a walk-through model, where a user proceeds to add data to a “study” (represented by an entity in the database) and record measurements for that study. The user can also view a history of all studies on the device.
As part of this team project for my CS 307 software engineering course, we developed a collaborative editor plug-in for the Eclipse environment. Users are able to share source code files with other users, who can view changes made to a document by other users in real-time, and make their own viewable modifications.
The plug-in integrates seamlessly with the Eclipse IDE, and features an independent server that can be run on any port-forwarded connection. Future versions will support additional editors, with more customizable features.
Test-drive the plug-in and browse the source code at our project homepage, hosted on Google Code here.