User:Kd8ikt
From Openmoko
(→demon daemon) |
(→demon daemon) |
||
Line 26: | Line 26: | ||
===demon daemon=== | ===demon daemon=== | ||
− | randomly toggles all the lights on/off at a random | + | randomly toggles all the lights on/off at a random times |
<br> vibrator stuff has been commented out | <br> vibrator stuff has been commented out | ||
Line 44: | Line 44: | ||
get_rand_sleep() { | get_rand_sleep() { | ||
rand_time=$RANDOM | rand_time=$RANDOM | ||
− | RANGE= | + | RANGE=5 |
let "rand_time %= $RANGE" | let "rand_time %= $RANGE" | ||
sleep $rand_time | sleep $rand_time | ||
Line 55: | Line 55: | ||
} | } | ||
− | get_rand_vib() { | + | #get_rand_vib() { |
− | + | # randy_vib=$RANDOM | |
− | + | # RANGE=250 | |
− | + | # let "randy_vib %= $RANGE" | |
− | } | + | #} |
while [ 1 == 1 ]; do | while [ 1 == 1 ]; do | ||
Line 65: | Line 65: | ||
get_rand | get_rand | ||
$e $randy > $aux_r | $e $randy > $aux_r | ||
+ | get_rand_sleep | ||
get_rand | get_rand | ||
$e $randy > $pow_b | $e $randy > $pow_b | ||
+ | get_rand_sleep | ||
get_rand | get_rand | ||
$e $randy > $pow_o | $e $randy > $pow_o |
Revision as of 23:23, 31 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 ? ideas anyone?
using accelerometer inputs draw a graph and calibrate a "level" point
so we can visualize accellerometer inputs
- ideas
- more then one graph and orbubble
- TARE aka recalibrate "center"
- is this even possible? will glamo be able to keep up? we could fix this with lowering the data acquisition timer (lower the fps)
demon daemon
randomly toggles all the lights on/off at a random times
vibrator stuff has been commented out
#!/bin/bash #/hacker/kd8ikt #this could be a neat silent ringer # # REQUIRES BASH $RANDOM 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_sleep() { rand_time=$RANDOM RANGE=5 let "rand_time %= $RANGE" sleep $rand_time } get_rand() { randy=$RANDOM RANGE=2 let "randy %= $RANGE" } #get_rand_vib() { # randy_vib=$RANDOM # RANGE=250 # let "randy_vib %= $RANGE" #} while [ 1 == 1 ]; do get_rand_sleep get_rand $e $randy > $aux_r get_rand_sleep get_rand $e $randy > $pow_b get_rand_sleep get_rand $e $randy > $pow_o # get_rand_vib # $e $randy_vib > $vib done
- killscipt
#cleanupSCIPT killall abovescriptname $e 0 > $aux_r $e 0 > $pow_b $e 0 > $pow_o $e 0 > $vib