I thoroughly enjoyed Ringo’s first four novels. I read the next 10 or so. I no longer enjoy them. I don’t know if his earlier novels were more carefully edited, or if perhaps he’s more confident in his current stuff, but I think I will no longer put John Ringo stuff at the top of my To Read list.
I loved The Hunger Games! It’s set a bit in the future in a collapsed society with a heavy-handed central government and stars young adults growing up.
If you enjoyed The Giver, you should read The Hunger Games.
I got a few 128×64 graphics LCDs for Christmas. One of the first things I did with them was make a Mandelbrot Set viewer–with zoom!
Video
The video is available in HD, and viewable in a larger size if you click through. The music is “Mandelbrot Set” by Jonathan Coulton.
Description
The Mandelbrot Set is a fractal. You can zoom on the border and get pretty pictures. There are a bunch of cool facts about the Mandelbrot Set at Wikipedia, and Jonathan Coulton has a sweet song about it.
This requires a GLCDks0108 library available on the Arduino Playground. Currently, to run, this library needs a simple modification! In ks0108.h, move the line
void WriteData(uint8_t data); // experts can make this public but the functionality is not documented
to the public: section. This function allows you to write a byte to the display, and advances the cursor. After a cursory browsing of the datasheet, it appears the fastest way to write data to the screen. I’m in the process of getting this change made in the library so this modification won’t be necessary.
Code
The code for this isn’t too difficult. The actual drawing of the Mandelbrot set is pretty much exactly as described in this nice Mandelbrot Set tutorial. It goes over the theory and the code for drawing the fractal. The only change I made in drawing the fractal was that I calculate 8 points, and then draw them to the screen as a group. This matches how the screen wants to receive data, and wastes less time interfacing with the LCD.
The zooming functionality is taken care of by a simple state machine in the loop() loop.
If you want to run this on a different microcontroller, the C should be fairly portable.
Schematics
Parts
In terms of hardware requirements, I used a ks0108 graphics LCD. These are available from a variety of vendors–but be careful and check your pinouts! The specific one I used was this 128×64 graphics LCD from Sparkfun, but there are a variety of displays listed in the Arduino Playground site for the graphics library I used.
Besides the LCD, I used a 220 ohm resistor (R1) and switch (SW1) to toggle the backlight, a 10k potentiometer (VR1) for setting the display contrast, two buttons (SW2, SW3) for back and forward, and a 10k potentiometer (VR2) for the cursor.
Future Work
I would like to take a look at fixing some of the rounding issues. There are some places where the drawing “looks funny” after enough zooms. I’m pretty sure it’s due to rounding issues with the limited floating point precision.
I would also like to improve the “back button” functionality so that you can go back in the middle of the zooming process if you make a mistake.
The controls could likely be made more intuitive by using something with a joystick. The software interface matches the input paradigm of a knob and some buttons, but if there was a cursor, and then moving the cursor made a box, the zoom would likely be more intuitive. This could be implemented with the Wii nunchuck.
Photo Gallery
More photos are available at my Mandelbrot Set photo set.
This is the eleventh of thirteen in a Series of Unfortunate Events. The first six or seven are ok, but there’s a distinct change midway through the series. The writing gets better, the situations are extremely surreal, and it gets a little fanwanky by being pro-reading. It doesn’t feel like an advertisement or a PSA, because you have to get through seven novels or so to get there.
The Graveyard Book is a good spooky-themed retelling of The Jungle Book. This book has since won a bajillion awards. While it’s not a bad book, I’m a little confused how it’s won so many awards. This is recommended, especially as it’s a pretty quick read.
I’ve set up little MediaWiki instances for small groups to do work in. One problem consistently encountered is a lack of awareness of updates and changes. The Recent Pages RSS is an ok step, but sometimes RSS isn’t an option. While there are RSS to Email services, the problem can also be solved directly in Mediawiki.
I used an extension I found on the Mediawiki, MailNotification. It provides a way to email all registered users of the wiki a summary page of all the changes made since the last time an email went out. Set up in cron, it’s an excellent way to make Mediawiki more suitable for small group collaboration.
The plugin doesn’t seem to be updated anymore, and it’s had a variety of issues for me everytime I update MediaWiki. I’ve been tinkering with the code, adding more details to the summary page and making sure it works with modern versions. I threw the code up on github last week, and provided a tagged release.
Feel free to let me know if you have any issues installing or using this plugin, and if you have any patches, feel free to send them my way.
Currently, Arduino 0017 doesn’t work in 64 bit Linux, including Ubuntu 9.04. Arduino includes a copy of libRXTX, which is for 32 bit systems. Ubuntu only offers up to librxtx 2.1 something as of August 2009, and that doesn’t help either.
There’s a pretty quick way to get everything working–even the Serial Monitor!
The solution is to download Arduino 0017 for 32 bit Linux. Extract the files, and remove lib/librxtxSerial.so and RXTXcomm.jar.
Download rxtx-2.2pre2-bins from the RXTX folks. Extract the files, and copy RXTXcomm.jar and x86_64-unknown-linux-gnu/librxtxSerial.so to the Arduino lib/ directory, basically replacing the two files that came shipped with Arduino 0017.
Doing this doesn’t enable any other java application on your system to use the newer RXTX libraries, but that isn’t a problem for me. I’d much rather keep the rest of my system using packages from the repositories. The Arduino devs seem to be completely on top of the problem and the Ubuntu devs are aware as well.
I loved this book! This book is in my top ten novels I’ve read this year. Ideas drip off every page. Two polities have the slogan “Brilliancy, speed, lightness, and glory!” and I instantly glommed on to it. Just brilliant.