ServoGold V2

Hello,

I got a Faller crane without motors build in. This was not acceptable so I build in some.

Please have a look at the pictures:

3.jpg
[more]
2.jpg
1.jpg

…and a video:

download/mrsd/ServoGoldV2/1.mp4

The source code is available at:

http://bazaar.launch … /arduino/ServoGold_2

I used “Chinese” gear motors and cheap potentiometers with an angle of 360° because I have not found any servo motor that’s rotational speed is useable for my needs -> it seems that the industry has no interest on it…
The hot glue is optional you could also use thin metal plates for fixing the motor onto the ground plate and the potentiometer onto the motor….

Software features:

-Movement training program, 3 lists with each 16 entries
-Manual movement
-Every horizontal movement includes a regulated vertical movement
-CV support

Steam switch

I have bought the wrong Seuthe steam generators (Seuthe 12) for my model railroad because I have no too less supply voltage for them. So I developed a simple circuit switching both half waves from the rail supply to the steam generator. For now on they work very well with a voltage of 22 Volts supplied to the circuit.

Photos (some changes made, have a look at the circuit!):

http://bazaar.launch … 08-04%2020.36.22.jpg
http://bazaar.launch … 08-04%2020.36.31.jpg

Circuit:

http://bazaar.launch … generator_switch.png
(I used Schottky diodes because of the smaller Von, and a smaller Rv for the optocoupler)
->The standard NPN could be replaced by a NMOSFET if you need more voltage on the steam generator…

Video:

http://www.tuxstef.o … 3-08-07-18-48-32.mp4

Have fun

Simple Cups print server script

Hello,

I’ve set up a print server with auto shutdown capability.
It checks if an idle timeout is reached, if there are active print jobs and if the idle timeout is greater than the uptime the server shuts down.
It also has a lock option if you want to have the server online (You could enable the lock with the ~/.xsession and/or the ~/.bashrc file).

#!/bin/bash

IDLE=30		#idle time in min

echo "Shutdown script"
echo "#########################################"
echo ""

if [[ "$1" == "lock" ]];
	then
	touch /var/lock/shutdown.sh.lock
fi

if [[ "$1" == "unlock" ]];
        then
        	rm -f /var/lock/shutdown.sh.lock
		echo "Lock file removed, exiting"
		exit 0
fi

if [ -f /var/lock/shutdown.sh.lock ];
	then
		LOCK=1
		echo "Lock file exists, exiting"
		exit 0
	else
		LOCK=0
fi

MODTIME=`stat -c %Y /var/log/cups/page_log | awk '{ printf $1 "n"}'`
TIME=`date +%s`
SECS=$(echo "$IDLE*60" | bc)
TEMP=`echo "$MODTIME+$SECS" | bc`
UPTIME=$(cat /proc/uptime | awk '{ printf $1 }')
UPTIME=$(echo $UPTIME / 1 | bc)
lpstat -t | grep -q "now printing"
PRINTING=$?

echo "Uhrzeit $TIME"
echo "Uptime $UPTIME"
echo "Idle secs $SECS"
echo "Temp $TEMP"
echo "Printing $PRINTING"

if  (( ( "$TEMP" < "$TIME" ) && ( "$UPTIME" > "$SECS" ) &! $LOCK  && $PRINTING )); 
	then
		echo "Printer spooler system shutdown because of idle timeout." | wall
		#echo $TEMP "<" $TIME
		/sbin/halt -p
	else
		echo "Printer spooler system: Timeout not reached"
fi

Have fun!

ltsp ubuntu 12.04 lts.conf fix for tftp

Hi,

If you are wondering if your thin-client doesn’t recognise the options with the

netkit-tftpd

in the lts.conf file placed in the tftp-boot dir please replace your

/opt/ltsp/i386/usr/share/ltsp/init-ltsp.d/05-getltsconffile

to this one

# get the lts.conf via tftp

# $filename comes from net-eth0.conf and is usually "/<path>/pxelinux.0".
# If it contains a path, we want to construct "/<path>/lts.conf".
# If it doesn't, we want just "lts.conf" without inserting a slash, as some tftp
# servers have problems with it. Finally, if $filename isn't set, we want to
# default to "ltsp/i386/lts.conf".
if [ -n "$SERVER" ]; then
    fileonly=${filename##*/}
    pathonly=${filename%$fileonly}
    lts_conf_temp=$(mktemp)
    tftp "$SERVER" -c get ${pathonly:-ltsp/i386/}lts.conf $lts_conf_temp >/dev/null
    # only overwrite lts.conf if it has non-zero size.
    if [ -s "$lts_conf_temp" ]; then
        mv "$lts_conf_temp" /etc/lts.conf
    else
        rm "$lts_conf_temp"
    fi
fi

# Get the lts.conf vars into the environment
. /usr/share/ltsp/ltsp_config

..or install the tftpd-hpa package!

Have fun!

vsftpd 2.3.5 writeable chroot

Hi,

using Ubuntu LTS 12.04 you’ll need to patch the vsftpd sources for using the “writeable chroot” implementation.

I’ve taken the patch from:

http://wl500g.googlecode.com/svn-history/r3735/trunk/vsftpd/030-writeable_chroot.patch

I’ve uploaded the patched source tarball for you:
http://www.tuxstef.org/download/vsftpd-2.3.5-writeable_chroot.patch.tar.bz2

Don’t fortget to change vsftpd.conf:

allow_writable_root=YES

Have fun!