Wednesday, April 4, 2012

My Mincraft Server is a Furnace

I don't like many of the "mainstream" computer manufacturers (as anyone who knows me will certainly know), but I am of the belief that there is a special place in hell for the engineers assclowns that design HP laptops. I have used two extensively- the one pictured being the second- and many more in passing along the way; almost all of them have had extensive overheating issues. The first one I owned (circa 2005) actually had the solder on the power connector melt. Three times. After the third, I stopped paying the fools to "fix" the problem.

 

So, having established the incompetence of HP, it comes as no shock that the dedicated laptop I run my Minecraft server on is having heating issues. Though I had initially thought it was a CPU issue, it turns out that I'm looking at a GPU problem instead. That's wonderful- particularly given that I don't even run X11 on the thing.

 

The proposed solution in the image above is propping it up on as many case fans as I can find. Seems to work. Now I just have to find out if it's Dynmap running on my server that's to blame. Not that it should've doing any of this anyway. Great. I love opening HP's hardware.

 

Thursday, March 22, 2012

Lets Make This More Difficult Than Needed...

Image by Sam Brown (www.explodingdog.com)
In my quest to continue perfecting this damn table, its obvious I'm going to need some kind of audio analysis somewhere along the way. At least if I like the idea of the lights going along to the music; and I do. Its rather why I'm bothering to do any of this at all.

So with my recent scrapping of the old software systems, I've begun to re-write the stuff I had previously done in Arduino/Processing IDEs in Arduino/C++. The major rewrite just makes sense now that I'm using an LCD screen onboard the Arduino and also given that the Processing sketch has developed this charming trick where it shits the bed and breaks serial communications whenever it feels like it. Its real cute. Especially at parties. The C++ part of it isn't too rough since I'm using the Qt framework for the GUI (vs Processing which... yea, anyway-) and alot of the other tasks; there is even a 3rd party library called QextSerialPort that lets me interface with the Arduino relatively easily.

But I wouldn't be writing if there wasn't a problem, right?

Right!

The problem is the audio analysis part of the program. Qt has its own media classes (Phonon or something- I dunno. I only know it sucks.), but they don't really do what I want. I've looked at countless other libraries too: SndObj, Marsyas, CLAM, and JUCE, just to name a few. I've found that they're mostly low-level, or have the entire opposite problem- I'm instantly drowned in a big ocean full of crap I don't want or need. CLAM has seemed most promising (especially due to Qt integration), but it just too top-heavy. For now I'll digress on my other... issues... with CLAM (you do not trumpet full cross-platform support if your last Windows release was more than 2 years ago, and it had to be cross-compiled on a Linux box. And some features don't work. And their documentation blows. And I don't like clams.)

For now I guess I've stepped back from finding a suitable library; mostly to avoid physical harm to my computer. It'd be great to find something with Qt widget integration so I don't have to re-invent the wheel, but in all likelihood I get to re-invent the stupid wheel again.

Thursday, March 15, 2012

LCD Screen Interfacing


A few weeks ago I ordered some new parts for the table- mainly some el wire and a 3.2 inch resistive LCD touchscreen. Though the wire wasn't too big a deal to get to an acceptable place, the screen has been presenting some issues. I got it off of eBay, so I expected a couple snags- not the headaches I actually got. Turns out the screen uses 3.3v logic, while the Arduino I'm using for the table uses 5v. After nearly burning the thing out before realizing this, I switched over to my other Arduino (Seeeduino Mega) which can switch between 3.3v and 5v logic. After wiring it up (many different ways) and programming it I got... Nothing. Great.

I'm not sure if it was my wiring or the software (the "technical document" on the manufacturer's site is completely useless), but I eventually found a library at henningkarlsen.com that supported the screen. After getting it going on the Seeeduino, I set about moving back over to the Mega.


Which brought me back to the logic voltage issue. The problem with this library is that- though it works great- it requires a full 16-bit connection to the LCD controller (SSD1289), along with the control signals; that totals 20 connections. 20 connections means 20 voltage divider circuits, and 40 resistors to go with them. Keep in mind this is also before adding the extra connections needed for the onboard SD card slot and touchscreen. I know I can buy a pre-built Arduino shield for this instead, but thats admitting defeat.

Friday, March 2, 2012

The Beer Pong Table




Anybody who knows me or has drank with me has at least heard about "The Table". This was a project I started years ago with a few friends as a way to build a better beer pong table, and has since evolved a fair amount. Though the goal was never to be the best BP table, things have shuffled a bit and now I guess I'm planning (at some point) to make it the best. Or something. Does it even matter?


Anyway, the initial build was from an old extending Ikea table that had taken up use as the resident pong table. We mounted the wood frame around the top of it for the plexiglass and lights, and from there things slowly evolved. The original control mechanism was a (hand soldered) board with 6 relays that I more-or-less just deadbugged together, all controlled by a laptop's LPT port from inside the cabinet we mounted on the bottom. It worked well enough, but the whole system had its quirks and it made annoying clicking sounds when in use. Later on, upon acquiring an old flatscreen monitor from a friend, I promptly disassembled it, cut a hole in the middle of the table, and mounted it in there with wood screws, right to the frame. I imagine some folks are wondering how smart that is; I don't really know, but its survived two moves at this point, so I don't really care.

With the advent of moving into a much larger apartment with my girlfriend (and the first party we were throwing in it a month ago) the table became interesting to me again. It'd been years since I'd improved it, and rather than gluing down a beer-bottle-cap design under the plexiglass and epoxying it down, the thing sat unused for years under a red tablecloth. The high points of its use during this time include when I once spilled some orange juice on it after a particularly late night. In light of this, I found an old laptop with a printer port, and decided to wake the sleeping beast. Only it didn't wake up. After a string of four-letter words, it became apparent to me that the old control board just wasn't gonna be having any of this. So I fucking tore it out.

The play-by-play is boring and generally a kinda hum-ho affair, but suffice to say the table now runs an Arduino Mega with a vastly improved light-control circuit. I used Ladyada's excellent LED strip tutorial as a jumping-off point for the new circuit and tested everything before soldering it all down to a prototyping shield I found at Radioshack (they sell Arduino stuff now? wtf? Thats not a cell phone...). The rebuild ended up running me around $100, but I had to get some extra tools there too, so the components were likely less.

Its worth noting that this also lets me fade the lights rather than just binary on/off. And it doesn't sound like a broken hard drive from all the relays switching states either. The real heavy lifting is done on my laptop, which is running a Processing sketch that analyzes the audio currently playing. I've been working to improve the sketch's code and still have a long ways to go, but currently it lets me control each light channel's attack/decay/release as well as a few triggering options- a specific frequency, the average of a range of frequencies, or beat detection for the snare/hat/kick.

The video is a little out of sync with the music (I dubbed over the audio with the actual song I was playing) but you can get the general idea.



I've already got an LCD (3.2 inch, resistive touch) on the way for the Arduino to play a more active role in the whole setup, along with some EL wire to run along the outside of the frame. Still haven't figured out what I want to do for that bottle-cap design yet though...

Resurrection

So I just recently decided it'd make sense to resurrect this blog as a means to show off some of the various projects I work on in my free time. It initially started off (years ago) as a project for an English class in college, and then it sat. So now maybe it'll have some use.

Check back to see progress on my ideas / project builds. Or don't. I don't really care.