diff --git a/sounds/aup/nix.00001.aup b/sounds/aup/nix.00001.aup new file mode 100644 index 0000000..03a9cef --- /dev/null +++ b/sounds/aup/nix.00001.aup @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sounds/aup/nix.00001_data/e00/d00/e00003b0.au b/sounds/aup/nix.00001_data/e00/d00/e00003b0.au new file mode 100644 index 0000000..b7a92f0 Binary files /dev/null and b/sounds/aup/nix.00001_data/e00/d00/e00003b0.au differ diff --git a/sounds/aup/nix.00001_data/e00/d00/e0000966.au b/sounds/aup/nix.00001_data/e00/d00/e0000966.au new file mode 100644 index 0000000..dcc071e Binary files /dev/null and b/sounds/aup/nix.00001_data/e00/d00/e0000966.au differ diff --git a/sounds/aup/nix.00001_data/e00/d00/e0000a10.au b/sounds/aup/nix.00001_data/e00/d00/e0000a10.au new file mode 100644 index 0000000..6ef51d1 Binary files /dev/null and b/sounds/aup/nix.00001_data/e00/d00/e0000a10.au differ diff --git a/sounds/aup/nix.00001_data/e00/d00/e0000bbe.au b/sounds/aup/nix.00001_data/e00/d00/e0000bbe.au new file mode 100644 index 0000000..9a3c910 Binary files /dev/null and b/sounds/aup/nix.00001_data/e00/d00/e0000bbe.au differ diff --git a/sounds/aup/nix.00201.aup b/sounds/aup/nix.00201.aup new file mode 100644 index 0000000..0d5eaf8 --- /dev/null +++ b/sounds/aup/nix.00201.aup @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sounds/aup/nix.00201_data/e00/d00/e000073f.au b/sounds/aup/nix.00201_data/e00/d00/e000073f.au new file mode 100644 index 0000000..b603d6a Binary files /dev/null and b/sounds/aup/nix.00201_data/e00/d00/e000073f.au differ diff --git a/sounds/aup/nix.00201_data/e00/d00/e0000a8b.au b/sounds/aup/nix.00201_data/e00/d00/e0000a8b.au new file mode 100644 index 0000000..c716771 Binary files /dev/null and b/sounds/aup/nix.00201_data/e00/d00/e0000a8b.au differ diff --git a/sounds/aup/nix.00203.aup b/sounds/aup/nix.00203.aup new file mode 100644 index 0000000..6eb3375 --- /dev/null +++ b/sounds/aup/nix.00203.aup @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sounds/aup/nix.00203_data/e00/d00/e000073f.au b/sounds/aup/nix.00203_data/e00/d00/e000073f.au new file mode 100644 index 0000000..b603d6a Binary files /dev/null and b/sounds/aup/nix.00203_data/e00/d00/e000073f.au differ diff --git a/sounds/aup/nix.00203_data/e00/d00/e0000a8b.au b/sounds/aup/nix.00203_data/e00/d00/e0000a8b.au new file mode 100644 index 0000000..c716771 Binary files /dev/null and b/sounds/aup/nix.00203_data/e00/d00/e0000a8b.au differ diff --git a/sounds/aup/nix.09903.aup b/sounds/aup/nix.09903.aup new file mode 100644 index 0000000..5d69a46 --- /dev/null +++ b/sounds/aup/nix.09903.aup @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sounds/aup/nix.09903_data/e00/d00/e0000863.au b/sounds/aup/nix.09903_data/e00/d00/e0000863.au new file mode 100644 index 0000000..c9062b3 Binary files /dev/null and b/sounds/aup/nix.09903_data/e00/d00/e0000863.au differ diff --git a/sounds/aup/nix.09903_data/e00/d00/e00008bd.au b/sounds/aup/nix.09903_data/e00/d00/e00008bd.au new file mode 100644 index 0000000..69685c2 Binary files /dev/null and b/sounds/aup/nix.09903_data/e00/d00/e00008bd.au differ diff --git a/sounds/aup/nix.09903_data/e00/d00/e0000ce4.au b/sounds/aup/nix.09903_data/e00/d00/e0000ce4.au new file mode 100644 index 0000000..a9578b3 Binary files /dev/null and b/sounds/aup/nix.09903_data/e00/d00/e0000ce4.au differ diff --git a/sounds/aup/nix.09903_data/e00/d00/e0000d86.au b/sounds/aup/nix.09903_data/e00/d00/e0000d86.au new file mode 100644 index 0000000..374aacc Binary files /dev/null and b/sounds/aup/nix.09903_data/e00/d00/e0000d86.au differ diff --git a/sounds/aup/patapotato.aup b/sounds/aup/patapotato.aup new file mode 100644 index 0000000..8b6c65d --- /dev/null +++ b/sounds/aup/patapotato.aup @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sounds/aup/patapotato_data/e00/d00/e00004f4.au b/sounds/aup/patapotato_data/e00/d00/e00004f4.au new file mode 100644 index 0000000..1767aa0 Binary files /dev/null and b/sounds/aup/patapotato_data/e00/d00/e00004f4.au differ diff --git a/sounds/aup/patapotato_data/e00/d00/e0000733.au b/sounds/aup/patapotato_data/e00/d00/e0000733.au new file mode 100644 index 0000000..05fb0e3 Binary files /dev/null and b/sounds/aup/patapotato_data/e00/d00/e0000733.au differ diff --git a/sounds/aup/patapotato_data/e00/d00/e0000df6.au b/sounds/aup/patapotato_data/e00/d00/e0000df6.au new file mode 100644 index 0000000..ebd773d Binary files /dev/null and b/sounds/aup/patapotato_data/e00/d00/e0000df6.au differ diff --git a/sounds/aup/patapotato_data/e00/d00/e0000e18.au b/sounds/aup/patapotato_data/e00/d00/e0000e18.au new file mode 100644 index 0000000..22c0e52 Binary files /dev/null and b/sounds/aup/patapotato_data/e00/d00/e0000e18.au differ diff --git a/sounds/aup/potatox.2221.aup b/sounds/aup/potatox.2221.aup new file mode 100644 index 0000000..1b63155 --- /dev/null +++ b/sounds/aup/potatox.2221.aup @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sounds/aup/potatox.2221_data/e00/d00/e0000916.au b/sounds/aup/potatox.2221_data/e00/d00/e0000916.au new file mode 100644 index 0000000..884d85e Binary files /dev/null and b/sounds/aup/potatox.2221_data/e00/d00/e0000916.au differ diff --git a/sounds/aup/potatox.2221_data/e00/d00/e0000fbe.au b/sounds/aup/potatox.2221_data/e00/d00/e0000fbe.au new file mode 100644 index 0000000..0e1877d Binary files /dev/null and b/sounds/aup/potatox.2221_data/e00/d00/e0000fbe.au differ diff --git a/sounds/aup/watering-can.aup b/sounds/aup/watering-can.aup new file mode 100644 index 0000000..a0530b4 --- /dev/null +++ b/sounds/aup/watering-can.aup @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sounds/aup/watering-can_data/e00/d00/e00003b0.au b/sounds/aup/watering-can_data/e00/d00/e00003b0.au new file mode 100644 index 0000000..b7a92f0 Binary files /dev/null and b/sounds/aup/watering-can_data/e00/d00/e00003b0.au differ diff --git a/sounds/aup/watering-can_data/e00/d00/e0000966.au b/sounds/aup/watering-can_data/e00/d00/e0000966.au new file mode 100644 index 0000000..dcc071e Binary files /dev/null and b/sounds/aup/watering-can_data/e00/d00/e0000966.au differ diff --git a/sounds/aup/watering-can_data/e00/d00/e0000a10.au b/sounds/aup/watering-can_data/e00/d00/e0000a10.au new file mode 100644 index 0000000..6ef51d1 Binary files /dev/null and b/sounds/aup/watering-can_data/e00/d00/e0000a10.au differ diff --git a/sounds/aup/watering-can_data/e00/d00/e0000bbe.au b/sounds/aup/watering-can_data/e00/d00/e0000bbe.au new file mode 100644 index 0000000..9a3c910 Binary files /dev/null and b/sounds/aup/watering-can_data/e00/d00/e0000bbe.au differ diff --git a/sounds/wavs/nix.00203.wav b/sounds/wavs/nix.00203.wav new file mode 100644 index 0000000..2084549 Binary files /dev/null and b/sounds/wavs/nix.00203.wav differ diff --git a/sounds/wavs/nix.09903.wav b/sounds/wavs/nix.09903.wav new file mode 100644 index 0000000..b8403e8 Binary files /dev/null and b/sounds/wavs/nix.09903.wav differ diff --git a/sounds/wavs/potatox.2221.wav b/sounds/wavs/potatox.2221.wav new file mode 100644 index 0000000..a367047 Binary files /dev/null and b/sounds/wavs/potatox.2221.wav differ diff --git a/sounds/wavs/potatox.2881.wav b/sounds/wavs/potatox.2881.wav new file mode 100644 index 0000000..56504b6 Binary files /dev/null and b/sounds/wavs/potatox.2881.wav differ diff --git a/sounds/wavs/wateringcan.wav b/sounds/wavs/wateringcan.wav new file mode 100644 index 0000000..bd7315d Binary files /dev/null and b/sounds/wavs/wateringcan.wav differ diff --git a/xylem/xylem_lawrence/biosensor.scm b/xylem/xylem_lawrence/biosensor.scm new file mode 100755 index 0000000..42eb592 --- /dev/null +++ b/xylem/xylem_lawrence/biosensor.scm @@ -0,0 +1,35 @@ + +(require net/url + fluxus-016/fluxa) + +(define serial (open-input-file "/dev/tty.usbserial-A200294d")) + +(define (read-serial) + (process (read-line serial)) + (read-serial)) + +(define (process str) + (let ([data (regexp-split #rx"," str)]) + (printf "biosense: ~a~n" (list-ref data 1)) + (data->noise (list-ref data 1)))) + + +(define (data->noise l) + (play-now (mul (1of2 (saw 40) (sine 30)) + (string->number l)))) + + +(define (x n) + (cond ((not (zero? n)) + (play-now (mul (saw (random 600)) (adsr 1 0 (rndf) 1))) + (sleep 0.1) + (x (- n 1))))) + +(define (1of2 x y) + (if (> 1 (random 2)) x y )) + + + +(x 33) + +;(read-serial) \ No newline at end of file diff --git a/xylem/xylem_lawrence/serial->xmpp.scm b/xylem/xylem_lawrence/serial->xmpp.scm new file mode 100755 index 0000000..8ab3bf1 --- /dev/null +++ b/xylem/xylem_lawrence/serial->xmpp.scm @@ -0,0 +1,37 @@ +;; send sensor data via xmpp + + +(module serial->xmpp scheme + + (require (planet zzkt/xmpp)) + (provide (all-defined-out)) + + (define serial (open-input-file "/dev/tty.usbserial-A9007Lgy")) + + (define (read-serial) + (process (read-line serial)) + ;(read-serial) + ) + + (define (scale b t n) + (/ (- t (/ (string->number n) 1024.0)) (- t b))) + + (define (process str) + (let ([data (regexp-split #rx"," str)]) + (format "vrob light-level=n:~a soil-moisture=n:~a" + (scale 0.9 1 (list-ref data 1)) + (scale 0 1.0 (list-ref data 2))))) + + ;; send via xmpp + + (define (send-data) + (with-xmpp-session "plant0000005@fo.am" "plant0000005" + (let sendrec () + (begin (send (message "plant0000003@fo.am" (read-serial))) + (sleep 0.5) + (sendrec))))) + + ) + + + diff --git a/xylem/xylem_lawrence/xylem_lawrence.pde b/xylem/xylem_lawrence/xylem_lawrence.pde new file mode 100644 index 0000000..589a0c8 --- /dev/null +++ b/xylem/xylem_lawrence/xylem_lawrence.pde @@ -0,0 +1,40 @@ +///////////// part of the groworld HPI prototype + +#include + +#define sense 0 // biosensor on analog pin 0 +#define power 8 // power for sensors + +unsigned long then = 0; // timer which will run for < 50 days +unsigned long interval = 10; // interval between reads in seconds + +///////////// set up & send + +void setup() +{ + pinMode(power, OUTPUT); + pinMode(sense, INPUT); + Serial.begin(9600); +} + + +int readlevel () +{ + int level = 0; + level = (analogRead(sense)); + return level; +} + +char display[64]; + +void loop() +{ + if (millis() - then > interval*1000) { + then = millis(); + sprintf(display, "%u,%u\n", (unsigned int)then, readlevel()); + Serial.print(display); + } +} + +///////////// +