Linux, Programming, Electronics, Freedom |
Laser Modem with an Arduino Microcontroller
This started when I ordered an IR led and phototransistor pair from Spark Fun along with some spare ATMega168 microcontrollers. I first experimented using the IR led to transmit 2400 baud serial to the phototransistor. I programmed my Arduino Diecimila with the sample serial program altering the baud rate and allowing it to run in a continuous loop.
Fractal Mountain Generation with Qt and OpenGL
Midpoint Displacement Formula
Using a packet sniffer to track games/applications phoning home, and how to block them via the routing table or the hosts file
The other day I was trying to play an old game I bought some time ago on my LAN. I was just trying to enjoy a little cooperative bot killing fun with my buddy, but for some reason, the game kept telling me my 'master key' or something along those lines didn't check out. Needless to say I wasn't happy with it... I bought this game... and maybe I wasn't supposed to play it on two machines at once... but at the very least I certainly didn't want it phoning home for a simple LAN game, a game mode where no master server or internet should be required.
So I decided to see what my 'game' was up to. A quick download of Wireshark (formerly Ethereal) and an even quicker packet sniff and sure enough I could see where my 'game' was initiating connections and across what port.
Encoding an image to sound
Spectrograms
Class Serialization in Perl
Data types in Perl
Before we serialize anything we first need to learn a bit about the data types in Perl. There are only three data types in Perl, these are scalars, arrays and hash tables. Below is an example of each.
$myScalar = 'This is a Scalar';
Data encryption in Linux using Truecrypt
Personal data security is often overlooked by many computer users today. As people use their computers more, they never stop to think about how much personal data is accessible on their hard drive. I have been looking for a safe and convenient way to deploy cryptology in Linux. So far Truecrypt has been the best choice. It is very convenient and cross platform. This story will show how to use it on Ubuntu Linux along with some basic data safety principals.
A quick word about data in Linux
One of the first things that fascinated me about Linux is devices are treated as files. For example if you have an IDE hard drive, it is located at /dev/hda or a SCSI hard drive is located at /dev/sda. This is true about all devices in Linux including serial ports /dev/ttyS0 and sound cards /dev/dsp.
You could output the data from these devices as they where any other file, for example you could redirect the data from your hard drive to the standard output using
Basic Stamp tokenizing and flashing from the Linux CLI
For those of you who aren't familiar with the Basic Stamp, its a small microcontroller available from Parallax. It runs at a whopping 20Mhz and has a full 2K of storage on board for instructions. Although it may not sound like much, its more than enough to program the stamp to do some interesting things. The Basic Stamp is programmed in PBASIC, parallax's version of BASIC the stamp interprets.
Rather than waste your time explaining the coolness of the Basic Stamp, (if you've found this page you're probably already interested) I want to focus on how it can be utilized under linux. Currently, Parallax has a very nice PBASIC IDE but its available for windows only. It can however be run under Wine, and with the proper font settings it doesn't look too horrible and is quite functional. But what is the fun in that?
AC Motor / Generator Project
This project started one night while I was lying in bed trying to visualize how an AC motor worked. I knew that it was different from a DC motor as in it did not require brushes and the speed was controlled by frequency instead of voltage. After some research I came up with this project to better my understanding of AC motors.
AC Theory:


