User:Kd8ikt

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Rave shell script)
(demon deamon)
Line 18: Line 18:
 
using accelerometer input we will make a simple bubble level
 
using accelerometer input we will make a simple bubble level
  
===demon deamon===
+
===demon daemon===
 
randomly toggles all the lights on/off and vibrator
 
randomly toggles all the lights on/off and vibrator
  

Revision as of 10:27, 30 July 2008

much <3 openmoko

James Lutz Cincinnati, Ohio USA

kd8ikt at fuse.net

my useless home hosted webserver ipv6+ipv4
http://we.trekbeyond.org/

call me on my moko 513 476 nine six nine four

Current Projects

bubble level

  • STAGE=planning
    • pygtk ?

using accelerometer input we will make a simple bubble level

demon daemon

randomly toggles all the lights on/off and vibrator


#!/bin/bash
#/hacker/kd8ikt
#this could be a neat silent ringer 
# doesnt do anything(safe) needs proper start/cleanup
#		REQUIRES BASH  $RANDOM
chilltime=1
e=echo
aux_r=/sys/class/leds/gta02-aux\:red/brightness
pow_b=/sys/class/leds/gta02-power\:blue/brightness
pow_o=/sys/class/leds/gta02-power\:orange/brightness
vib=/sys/class/leds/neo1973\:vibrator/brightness

get_rand() {
	randy=$RANDOM
	RANGE=2
		let "randy %= $RANGE"
}

get_rand_vib() {
	randy_vib=$RANDOM
	RANGE=200
	let "randy_vib %= $RANGE"
}
start() {
	while [ 1 == 1 ]; do
	sleep $chilltime
	get_rand
		$e $randy > $aux_r
	get_rand
		$e $randy > $pow_b
	get_rand
		$e $randy > $pow_o
			get_rand_vib
		$e $randy_vib > $vib
	done
}
stop() {
#cleanup
	$e 0 > $aux_r
	$e 0 > $pow_b
	$e 0 > $pow_o
	$e 0 > $vib
}

echo i'm painted into a corner




Personal tools

much <3 openmoko

James Lutz Cincinnati, Ohio USA

kd8ikt at fuse.net

my useless home hosted webserver ipv6+ipv4
http://we.trekbeyond.org/

call me on my moko 513 476 nine six nine four

Current Projects

bubble level

  • STAGE=planning
    • pygtk ?

using accelerometer input we will make a simple bubble level

demon deamon

randomly toggles all the lights on/off and vibrator


#!/bin/bash
#/hacker/kd8ikt
#this could be a neat silent ringer 
# doesnt do anything(safe) needs proper start/cleanup
#		REQUIRES BASH  $RANDOM
chilltime=1
e=echo
aux_r=/sys/class/leds/gta02-aux\:red/brightness
pow_b=/sys/class/leds/gta02-power\:blue/brightness
pow_o=/sys/class/leds/gta02-power\:orange/brightness
vib=/sys/class/leds/neo1973\:vibrator/brightness

get_rand() {
	randy=$RANDOM
	RANGE=2
		let "randy %= $RANGE"
}

get_rand_vib() {
	randy_vib=$RANDOM
	RANGE=200
	let "randy_vib %= $RANGE"
}
start() {
	while [ 1 == 1 ]; do
	sleep $chilltime
	get_rand
		$e $randy > $aux_r
	get_rand
		$e $randy > $pow_b
	get_rand
		$e $randy > $pow_o
			get_rand_vib
		$e $randy_vib > $vib
	done
}
stop() {
#cleanup
	$e 0 > $aux_r
	$e 0 > $pow_b
	$e 0 > $pow_o
	$e 0 > $vib
}

echo i'm painted into a corner