Embedded Web Server Is All About Clever Formatting

embedded-web-server

Take a look around here and you’ll find all kinds of embedded web servers. This one doesn’t look all that interesting, especially because it’s just a NIC plugged into a development board. But for us the interesting part is in how [Andrew Rossignol] chose to format the webpage assets to best utilize the under-powered server.

The project was spawned as part of a class in Internet Embedded Systems which [Andrew] is taking. The board has an ATmega16 microcontroller and he’s using the ever popular ENC28J60 on that Ethernet adapter board. The TuxGraphics TCP/IP Stack takes care of communications with the network.

One constraint which [Andrew] imposed upon himself was to use just a single response which the available RAM limits to about  700 bytes. Any decent webpage needs to have at least some graphics but that’s tough with the size limit. He managed to display an AVR logo by optimizing an SVG in Inkscape then stripped the rest of the cruft using VIM (explained in the demo after the break). With that piece of Linux-fu in his pocket he set to work streamlining the CSS file. The webpage isn’t just static either. He displays the server up-time and even allows the relays and LEDs on the Olimex board to be controlled.

Despite the limitations of the ATmega family they still seem to do some amazing Internet-connected stuff. Here’s one used as a Minecraft server.

Continue reading “Embedded Web Server Is All About Clever Formatting”

Carry A Git Server In Your Pocket

android-git-server

We love using Git for its superior version control. We often host our more advanced projects in a public Github repository. But the bulk of our little experiments are simply local repos. This is fine if you’re always at home, but if we are away from home we find ourselves having to SSH into our server to copy over the Git files. [Andrew] found a way around this slightly awkward process. He used an old Android phone as a Git server.

This actually makes a lot of sense when you start to think about it. Most Android phone have a microSD card slot to provide a huge storage bin (the lack of this on the Nexus 4 is baffling) so you don’t need to worry about running out of space. All of these devices have WiFi, making it easy to use them as an AP when there isn’t any other WiFi around. And the web-connected nature of the device will make syncing your repo over the Internet a snap.

Most of the behind the scenes work is done using Debian packages. This provides a few issues which [Andrew] walks through one by one. We also like his pointers like using ‘noatime’ on your EXTx file systems to avoid wear on the SD card.

Raspberry Pi As A Spotify Server With MPD Control

The Raspberry Pi has been very popular as a streaming music player. Sure, the only audio out option on the board is an analog stereo jack, but you can use a USB audio device to improve upon that if you wish. [Wouter van Wijk] wanted to use his RPi as a Spotify server. It’s a bit tricky to get everything configured for this, so he decided to give back by publishing a ready to use Spotify server image for the Raspberry Pi.

The project is call the Pi MusicBox. Like some of the RPi Pandora setups we’ve seen he included the ability to use the hardware as an AirPlay device too. To connect to the Spotify service he uses the Mopidy package. It can also play tracks from local storage (including the home network). It’s even capable of mixing the two sources in the same queue. Possibly the best part is that it can be controlled with any Music Player Daemon (MPD) client like the smart phone screenshots seen above.

If you’re interested, check out his GitHub repo for the project.

RPi Printer Server For Your 3D Printer

OctoPrint

Want to run your 3D printer without your laptop attached? Looking to make your hackerspace printer network accessable? OctoPrint aims to make a 3D print server for the Raspberry Pi.

The open source Python project allows you to upload and manage GCODE files on the RPi. You can then select files that you want to print, and get basic statistics before running the printer. Information including temperature can be reported back via the UI, and arbitrary GCODE commands can be run for setup and testing.

Some other nifty features include streaming video to the UI so the print job can be watched remotely. Support for creating time-lapse videos is also available. Adding a wifi dongle and webcam to an RPi turns it into a fully featured print server.

The project uses the Flask web framework to serve the UI, and Tornadio with Socket.io to communicate with the UI asynchronously. You can pull the code from the project’s Github and try it out.

Thanks to [Camerin] for sending this in.

LED Tells You When Your Server Has Melted

LED

One of the benefits of writing for Hackaday is the ability to command at will a legion of readers to descend on unsuspecting web servers. Most of the time a server can handle the load of thousands of connections. On the rare occasion, though, a server is turned into a pile of slag and dross to the satisfaction of us here at Hackaday and to the ire of admins everywhere.

Checking to see if your server is still running or not isn’t terribly interesting, though. [Eric] thought it would be cool to have a proper physical visualization of how busy his server is, and ended up using a blink(1) USB-controllable LED to display his current server load.

The blink(1) is a small, USB controlled RGB LED that can be used as a universal indicator light. [Eric] had the idea of plugging it in to one of his servers and having the brightness of the LED change in response to the load on the server. He did this with a Python script that queries the Google Analytics API and returns a value from 0 to 255 in response to how popular his server was in the last 10 minutes.

Of course, there’s always a chance Hackaday could Slashdot his server. In that case, the blink(1) glows a steady red, alerting [Eric] to his popularity.

Raspberry Pi Used As A Squeezebox Server

rpi-squeezebox-server

[Jacken] loves his lossless audio and because of that he’s long been a fan of Squeezebox. It makes streaming the high-bitrate files possible. But after Logitech acquired the company he feels they’ve made some choices which has driven the platform into the ground. But there is hope. He figured out how to use a Raspberry Pi as a Squeezebox server so that he can keep on using his client devices and posted details about the RPi’s performance while serving high-quality audio.

First the bad news: the RPi board doesn’t have the horsepower necessary to downsample on the fly. He even tried overclocking but that didn’t really help. The good news is that this issue only affects older Squeezebox clients (he had the issue with V3) and only when playing tracks that are much higher quality than a CD (24-bit at 88.2Khz). He has no problem streaming those files to devices that can play them, and can even stream multiple files at once without any issues.

You can install the Sqeezebox server on your own Raspberry Pi by following this guide.

AVR Minecraft Server Lets You Toggle Pins From The Virtual World

Wanting to test his skills by building a webserver [Cnlohr] decided to also code a Minecraft server which allows him to toggle pins from inside the game. The rows of switches seen above give him direct access to the direction register and I/O pins of one port of the ATmega328.

The server hardware is shown in the image above. It’s hard to tell just from that image, but it’s actually a glass substrate which is [Cnlohr’s] specialty. He uses an ENC424J600 to handle the networking side of things. This chip costs almost twice as much as the microcontroller next to it. But even in single quantities the BOM came in at under $20 for the entire build.

In the video after the break [Cnlohr] and a friend demonstrate the ability for multiple users to log into the Minecraft world. The simulation is fairly bare-bones, but the ability to affect hardware from the game world is more exciting than just pushing 1s and 0s through some twisted pairs.

Continue reading “AVR Minecraft Server Lets You Toggle Pins From The Virtual World”