Writing a paper in LaTeX will always result in beautiful output, but if you’d like to put that document up on the web you’re limited to two reasonable options: serve the document as a .PDF (with the horrors involves, although Chrome makes things much more palatable), or relying on third-party browser plugins like TeX The World. Now that [Todd Lehman] has finally cooked up a perl script to embed LaTeX in HTML documents, there’s no reason to type e^i*pi + 1 = 0 anymore.
For those not in the know, LaTeX is a document typesetting language that produces beautiful output, usually in PDF form. Unfortunately, when [Tim Berners-Lee] was inventing HTML, he decided to roll his own markup language instead of simply stealing it from [Don Knuth]. Since then, LaTeX aficionados have had to make do with putting TeX snippets into web pages as images or relying on the [; \LaTeX ;] generated from the TeX The World browser extension.
[Todd Lehman]’s perl script generates the PDF of his LaTeX file and pulls out all the weird font and math symbols into PNG files. These PNG files are carefully embedded into the HTML file generated from the normal text pulled from the LaTeX file. It’s a ton of work to get these document systems working correctly, but at least there’s a reasonable way to put good-looking LaTeX on the web now.
If you’re going to freeze your butt off smoking in the middle of winter you might was well have company while you’re out there. [Zach’s] company wanted to crunch some data about smoking breaks and worker productivity. Instead of just meeting the bland data collection needs he decided to add functionality.
He took time to explain the different parts of the system. Above you can see the web interface that lets you know which of your coworkers are smoking right now. It also lets you click to check in and out from your breaks. After this was up and running he found that often the smokers forgot to ‘clock out’ before a break. As a backup system he build a physical interface on the way out of the office. Each smoker has their own button with a corresponding LED. If the light’s on you’re having a break and when it’s off you’re working. This controller is Arduino based and uses a Perl script to monitor the input and sync both that physical display and the web interface. [Zach] posted a few pictures if you want to take a look at the rest of the system.
Here’s an analog bandwidth meter made to look like an old pressure gauge. It’s actually new, but the paper showing the graduated scale was stained in a bath of black tea, then dried in an oven to give it an aged appearance. We think it’s quite effective.
The dial itself is a volt meter driven by an Arduino in much the same way as the multimeter clock. Bandwidth data is pulled from a Linux router, filtered down to the target data using ‘grep’, and sent over the serial connection by a Perl script. Since the meter itself is just waiting for serial data, alterations to the router’s scripting make it easy to represent a count of unread emails, tweets, or whatever data your code can scrape.
Here’s a study in sprite animations that [Travis Goodspeed] put together. He’s working with one of his favorites, the pink IM-ME device that he’s been hacking on for a while now. But if you don’t have this hardware that shouldn’t discourage you. There’s a lot to be learned from his methods which will translate to any microcontroller working with a graphic LCD.
He starts with a 24-bit PNM sprite that includes three frames of his desired animation. From there he needs a way to store the data for use with 8-bit microcontrollers. He chose to write a Perl script that will translate the image format into a 1-bit map. Each frame of the animation takes up a column width that is a multiple of 8 for easy retrieval by the processor. This translation into a C array, and the accompanying code that translates it into data for the frame buffer is the key to the animation process. What is he shooting for? A sprite-based video game on the handheld.
[Dodgy] wrote in to talk about his power meter data harvesting programs. This uses the same hardware by CurrentCost as the hack we looked at over the weekend but [Dodgy’s] implementation is different. It’s separated into two parts, the first is a webserver written in C that harvests the data and makes it available at an address on the network, the second is written in Perl to format and upload data to Google PowerMeter.
The C program serves data on a configurable port, defaulting to 3090. All of the data can be accessed in one line of code by loading http://127.0.0.1:3090, or individually with subdirectories like /watts, /time, or /tempr. From there you can do what you want with the data. The second part of [Dodgy’s] suite is a Perl script that polls the C server and sends the data to your Google account.
One thing that interests us is his comment that you should be able to compile the server side C code for an embedded device. It would be a nice energy savings to be able to upload data regularly without a PC running constantly.
[Graham Auld] got his hands on an energy monitor for free from his utility company. The device seen in the insert provides a nice LCD display but he wanted a way to graph the data over time. There was an included cable and a method of using Google PowerMeter but only for Windows computers. He did a little poking around and came up with a Perl script to interface the meter with Google’s tools.
The hardware module is known as the Current Cost CC128 and the developer was nice enough to publish an XML output description which [Graham] used in his script. From there it’s just a matter of registering and authenticating through the Google PowerMeter API. The script is not fully polished yet but it serves as a road map for your own implementation.
[Reza] sent in his mood rock. Unlike other “mood” devices, instead of showing what mood you’re in, it shows what mood the internets are in. Two ShiftBrite modules are controlled by an AVR ATmega8 which then connects to a computer via USB. The assembly is placed inside of a piece of alabaster.
USB communications are controlled by the ATmega8 running V-USB (formerly AVR-USB) firmware. [Reza] wrote some code to control the colors from the web using Perl and AJAX. Head over to the web interface to set the colors yourself. We’d love it if a live webcam was added so we could see our mood on the rock itself. Continue reading “Web controlled Dark Crystal”