Easton's blog

NES controller on the Raspberry Pi

Because I wanted the full experience, I wanted to hook up my NES controller to my Raspberry Pi and play NES games. I looked around and didn't find anything that fit my needs.

I wrote a script, that's up on Github now, that converts button presses on the NES controller to keyboard presses. So for example, by pressing the A button it registers as pressing the Z key on a keyboard. How to set it up is all right here.

I spliced the wires on the NES controller (thanks to this diagram) and used a breadboard to connect the appropriate wires to ground, +5V, the data, latch, and clock pin. Now I can play Mario in retroarch with a NES controller!

SNES emulator on the Raspberry Pi

 I won a Raspberry Pi for getting 3rd place in the Open 7400 Logic Competition, of which HubCityLabs donated the Raspberry Pi. My initial project idea for it was to set up a wall mounted weather station. For the time being I thought I'd mess around with it and get somehwhat familiar on what I'm dealing with.


I downloaded the Rasbian image and wrote it to an SD card. It's recommended that the SD card is a minimum of class 4.

Everything is supported 'out of the box' with Rasbian so there's no fiddling around. After purchasing a HDMI cable and connecting it to the Pi, it still output video via the RCA jack instead. I opened up /boot/config.txt and set hdmi_safe=1 and voila, HDMI worked!

Update: iStat on pfSense


pfSense 2.x runs on FreeBSD 8, instead of the previous 7. I wanted to get istatd working on my router, so I fetch'd libxml2 from here and the istatd binary (version 0.5.7) compiled against FreeBSD 7 from my previous blog post, here. For this to work, you'll also need the iOS app. When running istatd, it complained about some libraries. I simply created symlinks from the old library to the new one and everything worked fine, see below.

ln -s /lib/libz.so.5 /lib/libz.so.4
ln -s /lib/libkvm.so.5 /lib/libkvm.so.4

You can get a template for the configuration file here and put it in a nice place, like /etc/istat.conf 

Create your user, group and socket file and you're good to go:

pw user add -n istat
pw useradd istat -G istat
touch /tmp/istatd.sock

Then, you can run the istatd daemon with just

istatd -d -c /etc/istat.conf

 Now, you'll be able to monitor your pfSense box with iStat!



DeLicate Linux, still usable at 166Mhz

Linux, one way or another, really brings out your inner hacker. I've been tinkering quite a bit with DeLicate Linux. It's a lightweight distro made for old computers that uses the 2.4 kernel. Right now, I have DeLicate running on a Pentium 166 with 64MB of RAM. Surprisingly, Fluxbox and Xchat run without any huge problems. Replacing Bash with Dash helped free up some RAM as well. DeLicate uses pacman as the package manager, so building new packages is as easy as creating a PKGBUILD file.

SEOBudd WordPress plugin

I thought I'd mess around with WordPress and create a plugin or two. I ended up creating SEOBudd, a SEO stats plugin for WordPress. It retrieves stats about your website, such as average load time, social media mentions and incoming search words. It' has been approved and is now available for purchase on CodeCanyon.



4000 series CMOS 24 hour clock

 For the last couple months a friend and I have been working on a 4000 series based clock in electronics class. After having failed building a FM receiver, we opted for a clock. We didn't go the microcontroller way, but old school ICs. So, we created a circuit for a simple clock. I opted for a 24-hour version, while my friend made the 12-hour equivalent. 

Pasteros is now on Github

I recently put Pasteros up on Github [link], the text storage service. What was once a singular file is now a collection of models, views and controllers. You can see it running here: paste.gelat.in. Feel free clone the repo and use it for your own projects.

Using Xdebug with NetBeans 7

There comes a time where it's unacceptable or inconvenient to stash var_dump() into your code. And then there's Xdebug. Xdebug makes it easy to debug your PHP application and with the intergration of NetBeans, it's even easier.

For the record, I'm using Debian 6.0.4 on my workstation and Debian Wheezy/Sid on my dev server.

First of all, lets install Xdebug on the server:

pecl install xdebug

Find the largest installed packages in CentOS

I recently bought a VPS to host a Counter Strike server. WIthout having any choice, I was stuck with CentOS 5. After getting everything set up, I wasn't left with much disk space left. So, I read the man page for sort and used the following RPM command to find the largest packages installed:

rpm -qa --queryformat '%{name} %{size}\n' | sort -k2n



So, I have this old Pentium 166 box laying around, so I thought I'd stick Linux on it (of course). At first, I used DeLi Linux and it ran quite well. The problem is, the project changed directions, to ConnochaetOS. They took a more modern take on things, using kernel 2.6 and other modern applications. Most of the newer applications don't run quite well on an older box. So, after finding a mirror of a DeLi Linux that I cloned to a local server, I now had a working respository.




Subscribe to RSS - Easton's blog
Powered by Drupal