ts-7000
[Top] [All Lists]

[ts-7000] Re: Output 5VDC from DIO line

To:
Subject: [ts-7000] Re: Output 5VDC from DIO line
From: "Jaan" <>
Date: Tue, 07 Feb 2012 12:08:38 -0000
Hi,

Just to give some starting point, create a new shell script (new.sh for 
example). An example shell script would be:
----
#!/bin/sh

# The 1 should be replaced with some condition
while [ 1 ]
do
  echo "Sending 3 ping packets..."
  # Ping www.yahoo.com 3 times, then see if "0 received" exists
  stringvariable=$(ping -c 3 www.yahoo.com | grep '0 received')
  stringlength=$(expr length "$stringvariable")
  # Check the length of string
  if [ "$stringlength" == "0" ]; then
    # Here should be the command when ping works
    echo "Ping works more or less..."
  else
    # When "0 received" was found somewhere...
    echo "Ping failed..."
    # Here should be the command for the DIO pin
  fi
  # Sleep for 30 seconds before going back to the beginning
  sleep 30
done
----

Unfortunately, I don't know how to toggle a DIO pin on TS-7350.

Jaan

--- In  "ysuwansiri" <> wrote:
>
> I have a TS7350 board, and I would like to know how I could write a script to 
> "If ping yahoo.com fails, then TS7350 outputs 5VDC from its DIO line". Please 
> advise...
> 
>    Arm
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU