Tuesday, October 15, 2013

Apparently I write game reviews now

Today I posted my first game review ever. It's a review of C64anabalt, a Commodore 64 port of the 2009 indie platform game. 


Could very well be the first C64 game I've bought with my own hard earned cash.
After flaunting my purchase of C64anabalt on Google+ I was approached by the owner of the blog My Commmodore 64 and asked to write a review. So I did.

So what are you waiting for, off to My Commodore 64 you go!

Monday, September 16, 2013

Unsuccessful: Wireless Arduino Mood Light Controller v4

Prologue: 
I started writing the below post about a year ago but in the end I never really found a solution to the problem and consequently I never finished the post. Sometime it's best to know when to quit, but maybe this project can be of use to you anyway. Or maybe you'll find the solution that I didn't... well if you do please let me know. 

Look Ma no wires!

Ok, so I've built an Arduino based Mood Light Controller and I've managed to get my Arduino to send integers over RF with VirtualWire. Finally I've also built my first Arduino Standalone ATmega / Arduino Bare.

Now I've combined the three into one Wireless Arduino Mood Light Controller. To be honest I had two very different projects planned for my Standalone ATmega and the RF part but those sort of became obsolete in my current living situation.


Original circuit drawn with www.circuitlab.com
Above circuit breadboarded on a protoshield.

A bug in the code?

When I first merged the RGB Mood Light code with the RF Receiver code my Arduino kept hanging. Confident in my own coding skills I quickly aimed my blame towards those who write librarys for the Arduino IDE. The good folks in the Arduino forum managed to deflate my swelling ego and pointed out a few flaws in my code before coming to the conclusion that it might be a hardware problem.

"The rise and fall of a ego" is available as a thread in the Arduino forum.

Meanwhile back on earth ...
I moved my question to the General Electronics part of the Arduino forum, this time with a little more humble attitude. After following the instructions of Grumpy_Mike I quickly learned that my problems came from interference caused by using PWM to control the RGB LED. The trick was to swap out the resistors to 1K Ohm resistors in order to minimize the current and the interference it caused. With 1K Ohm resistors everything worked flawless, well except for the LED that got quite dim.

To minimize the interference Grumpy_Mike suggested the use of capacitors and/or ferrite beads. This actually helped a bit but still not good enough.

Improved circuit with capacitors to stop interference caused by PWM.


Above circuit breadboarded on a protoshield.

Kind of messy and lot's of wires that can cause interference. 

Apparently the problem with a circuit like this is that every lead and wire is a source of interference.So I was advised to try to make the circuit tidier, shorten leads and hope for the best.

Leads of the LED and resistors trimmed down ... 

... and the RF receiver connected via a ferrite bead as well as an added physically distance. 

Also the power supplied to the RF receiver is decoupled with a capacitor. 

Dead end? 

Unfortunately all this helped very little... and I'm sort of stuck. If you do find a solution to this please let me know as I would love to finish this project.

Source code

Transmitter code
Receiver code

Please note: The above code is a work in progress and could change, stop working (worse than it already does) with out notice.


Wednesday, September 4, 2013

Upgrading from Squeeze to Wheezy using Cupt

I recently read about Cupt a rewritten apt-get replacement that apparently would be more suitable for low end machines. Well it's not specifically written for low end machines, I guess it's just less resource demanding.

Anyway I decided to try upgrading my old Toshiba 320CDS from Debian Squeeze to Wheezy using cupt. Upgrading in Cupt comes in a couple of different flavors. I decided to go with the one I know best:
sudo cupt update 
sudo cupt dist-upgrade 

Actually all things went fairly smooth  apart from conky breaking the upgrade halfway through. I resolved this minor issue by just removing conky (sudo cupt remove conky) when the upgrade broke and then just start the upgrade from scratch (or whatever state my system was left in).

When the upgrade was done, everything seemed to be ok, but at reboot I was dropped to busybox...(sigh) as usual. This happens because I have to used the ide-generic kernel module to boot from my ide disks.
I typed in:
modprobe ide-generic 

But my system said that no module with that name was available... (this is where I panicked and retyped that about twenty times trying different combinations of ide, -,_ and generic). Naturally that didn't accomplish anything so I googled a bit and found that ide-generic had been removed from the kernel packages and been replaced by pata_legacy.ko
So instead I tried:
modprobe pata-legacy 

The module loaded and my drives were recognized. I hit CTRL-D and the boot resumed.

As soon as my system was up and running I replaced ide-generic with pata-legacy in /etc/initramfs-tools/modules
and issued:
sudo update-initramfs -u 

...and rebooted without a hitch. Well actually, first I replaced it with pata-generic, which of course is very wrong and got dropped to busybox again. But I will never admit to that. ;)

Also I must say that cupt feels a tad bit snappier than apt-get.

Sunday, April 21, 2013

Official update of CAMP time to rejoice!


Today (yesterday) I got an email from the author of CAMP who had found my efforts on getting his old software to work on newer systems. Much to my delight he also offered to do the updates required to get CAMP to work or rather play nice with modern compilers.

Anyway here's a link to the latest version: 

This version compiles without any issues on my Crunchbang Waldorf system. Happy Camping!

Thursday, March 14, 2013

Solder fume extractor

12 V DC computer fan with grill, filter and a 2.1 mm DC connector. 

Make's Candy tin fume extractor had me pestering friends and coworkers for 40 mm x 40 mm fans for a long time until I finally googled up this picture instead. A bare bones solder fume extractor that I find a lot more appealing than the candy tin version. Even better it delivers more "suck" and I already had a suitable fan.

I might paint it somewhere in the future. I think matte white would look
pretty cool in contrast to the black fan, filter an cable. 

Filter side, yes it's missing one set of nut/bolt/washers.
My idea about using the already rounded corner of the filter
to my advantage turned out as a disadvantage. 

Wednesday, March 13, 2013

Breathing new life into a sluggish iBook G4

Well maybe not as much new life. Let's call it an iBook G4 on dialysis, anyway the main objective was to erase and reinstall OSX 10.5 Leopard on my 12" iBook G4 1,33 GHz . Unfortunately my original DVD was "lost" so I had to go and find another solution.

Failure 1 - Burned image on DVD

I did try to burn a new DVD using an image of the original but that didn't pan out very well as the installation process got stuck in the verification phase. I did try to skip the verification process but that just left me with a totally unusuable system.

Failure 2 - External USB DVD 

I moved on to trying to boot from an external USB DVD reader/writer using instructions I found at Ben Collins blog. But for some reason my external USB DVD reader/writer just wouldn't show up in Open Firmware.

Success - Image on USB stick

When I was busy googling for options to get my external DVD functioning I briefly read something about USB sticks being friendlier in this scenario than a USB drive of some sort. So I used OSX's "Disk Utility" to write the aformentioned ISO image to a USB stick and went back to step 1 of Ben Collins instructions and success showed its pretty little face at step 4 i.e typing boot ud:,\\:tbxi in open firmware. From there on everything worked flawlessly. To get to open firmware press and hold Command+Option+O+F as soon as you power up your iBook.

Apps?

The only problem was that many of the apps I had installed on my iBook now only supports Intel architecture. But I quickly realized I'm not alone! I found the Power PC Software Archive a great collection with the latest release of many PPC apps on local mirrors. This means I that I once again can run Spotify on my iBook G4. Also I found the Mac PowerPC blog, and the great great great app MacTubes. Normally YouTube is out of the question on the old iBook, ok so I might get it to start but viewing pleasure is out of the question. MacTubes changes all that, now I can search, browse and play videos to my hearts desire with out any lag or out of sync audio what so ever.

Tuesday, March 12, 2013

Shutdown Linux nicely with a USB stick the right way

Forget everything I wrote in my previous post. Like Andrew pointed out in the comments on my youtube video and the blog, running a cron job every minute isn't really optimal. There is a better way to do it.


The fun part is that it doesn't require autofs since it uses udev rules and can find out the id of a USB stick (or any other device I guess) upon connection instead of going through the mounting process. At the same time it also manages quite nicely renders my script obsolete since you can issue "shutdown -h now" directly. Oh, did   mention it's A LOT faster. 

Well enough with the talk here's how you do it: 

Find out the vendorId and productId of your USB stick: 
$ lsusb
Here's my output, the numbers you want are the ones after "ID" the first one is the vendorId and the latter productId:
Bus 001 Device 003: ID 0781:7114 SanDisk Corp. Cruzer Mini
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Then create an aptly named file in: /etc/udev/rules.d/ I went with: 100-usb-device-action.rules 

Then add the following line, just substitute your vendorId and your productId
ACTION=="add", ATTRS{idVendor}=="0781", ATTRS{idProduct}=="7114", RUN+="/sbin/shutdown -h now"

That's it! Your done. Insert that USB device and watch your system shutdown in a nice way.