On 8/5/07, Gregg Levine <[EMAIL PROTECTED]> wrote:
>
> Hello!
> I've come up with a reasonably simple method of writing to the
> switches that I am using with regards to OWFS, and it is a shell
> script. However what I've created may not be the best example:
> #!/bin/sh
> modprobe fuse
> owfs -u /mnt/1wire
> #
> echo "0"> /mnt/1wire/12.D5D61F000000/PIO.A
> #sleep 20
> echo "1"> /mnt/1wire/12.D5D61F000000/PIO.A
> #sleep 20
> echo "1"> /mnt/1wire/12.F7D11F000000/PIO.A
> #sleep 20
> echo "0"> /mnt/1wire/12.F7D11F000000/PIO.A
> #sleep 20
> #
> echo "0"> /mnt/1wire/12.D5D61F000000/PIO.A
> #sleep 20
> echo "1"> /mnt/1wire/12.D5D61F000000/PIO.A
> #sleep 20
> echo "1"> /mnt/1wire/12.F7D11F000000/PIO.A
> #sleep 20
> echo "0"> /mnt/1wire/12.F7D11F000000/PIO.A
> #sleep 20
> #
>
> Obviously this is a first attempt, therefore it could be improved.
> That's where I am at a loss. Advice please folks.
>
Looks pretty good. Since you repeat the sequence:
#!/bin/sh
#defines
DIR=/mnt/1wire
CHIP_FOO=12.D5D61F000000
CHIP_BAR=12.F7D11F000000
modprobe fuse
owfs -u $DIR
for rep in 0 1 ; do
echo "0"> $DIR/$CHIP_FOO/PIO.A
#sleep 20
echo "1"> $DIR/$CHIP_FOO/PIO.A
#sleep 20
echo "1"> $DIR/$CHIP_BAR/PIO.A
#sleep 20
echo "0"> $DIR/$CHIP_BAR/PIO.A
#sleep 20
done
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers