Saturday, December 17, 2011

Using Linux to turn an LED indicator on via the serial port.

What I wanted to do was create a ready indicator where the LED would light up after it's finished booting. The only reason I needed this is because it's a headless system. (no monitor) I finally figured out how to turn one on via the serial port.

I wired it up like this:


Being as resourceful as possible I used a cd-rom audio cable since I only needed to work off two pins and I had one just laying around and the pin holes happened to be perfectly spaced.

I just had the script start running after the service that I was concerned about starts.

#!/bin/bash
while :; do echo 'null' > /dev/ttyS1; sleep 0; done &


This results in an infinite loop of 'null' to be sent to the serial, causing the light to stay on.

Hope this info helps someone!
~Cheers!

Friday, November 16, 2007

Creating Animated GIF files with Ubuntu 7.10

First you need a program called "Avidemux"
Click here to download the .deb file

Once you have that installed you need to launch it and open the video that you want to chop.

Select the part of the video that you want to use as an animation using the A/ and /B buttons.

A/ = Beginning

/B = End

Now you need to save your selection as JPEG files.



In Avidemux go to

File>Save>Save Selection as JPEG images...



Save the project to a new folder, then view the files in their folder and delete any unwanted frames.
Next, fire up F-Spot photo manager, import the folder:
File>Import
To resize the frames we will need to export them.

In F-Spot you will need to click on browse and then hit CTRL+A to choose the frames

Then export them:
File>Export>Export to folder...
Then reduce the amount of pixels to resize the frames.


Next you need to fire up the GIMP and open the first frame.

Next we need to open all the frames as layers.
To do this we need to go to our first frame and go to the menu:

File>Open as layers

Browse to the folder with all the frames in it and hit CTRL+A

Then hold CTRL and click on your first frame to deselect it and then open the files.

Hit CTRL+L, that will bring up the layers.



To preview your animated image simply go to the picture window then:

Filters>Animation>Playback and hit play.



To help reduce the file size go to:

Filters>Animation>Optimize (for GIF)



All you have to do now is save the image as a GIF and choose to save it as an animation.