User:Kd8ikt

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Rave shell script)
m (Rave shell script)
Line 24: Line 24:
  
 
#!/bin/bash
 
#!/bin/bash
#DEFINE VARIABLES
+
 
echo=e
+
#Define Constants
 +
e=echo
 
aux_r=/sys/class/leds/gta02-aux\:red/brightness
 
aux_r=/sys/class/leds/gta02-aux\:red/brightness
 
pow_b=/sys/class/leds/gta02-power\:blue/brightness
 
pow_b=/sys/class/leds/gta02-power\:blue/brightness
 
pow_o=/sys/class/leds/gta02-power\:orange/brightness
 
pow_o=/sys/class/leds/gta02-power\:orange/brightness
 
#vib=/sys/class/leds/neo1973\:vibrator/brightness
 
#vib=/sys/class/leds/neo1973\:vibrator/brightness
 +
 +
#DEFINE VARIABLE
 +
chilltime=1
  
 
#DEFINE RANDOM # GENERATOR FUNCTION
 
#DEFINE RANDOM # GENERATOR FUNCTION
Line 39: Line 43:
  
 
while [ 1 == 1 ]; do
 
while [ 1 == 1 ]; do
 
+
sleep $chilltime
 
get_rand
 
get_rand
$e $RANGE > $aux_r
+
$e $randy > $aux_r
get_rand
+
$e $RANGE > $pow_b
+
 
get_rand
 
get_rand
$e $RANGE > $pow_o
+
$e $randy > $pow_b
 +
get_rand
 +
$e $randy > $pow_o
  
 
done
 
done
 +
 
</pre>
 
</pre>

Revision as of 08:03, 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

Rave shell script

      • not finished***

#!/bin/bash

#Define Constants
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

#DEFINE VARIABLE
chilltime=1

#DEFINE RANDOM # GENERATOR FUNCTION
get_rand(){
randy=$RANDOM
RANGE=2
let "randy %= $RANGE"
}

while [ 1 == 1 ]; do
sleep $chilltime
get_rand
$e $randy > $aux_r
get_rand
$e $randy > $pow_b
get_rand
$e $randy > $pow_o

done

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

Rave shell script

      • not finished***

#!/bin/bash
#DEFINE VARIABLES
echo=e
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

#DEFINE RANDOM # GENERATOR FUNCTION
get_rand(){
randy=$RANDOM
RANGE=2
let "randy %= $RANGE"
}

while [ 1 == 1 ]; do

get_rand
$e $RANGE > $aux_r
get_rand 
$e $RANGE > $pow_b
get_rand
$e $RANGE > $pow_o

done