Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Time triggered events

  1. #21
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote Originally Posted by GadgetBandit View Post
    "Why won't this work?" !!!!!

    Last night and all the morning, I've asked this question a thousand times!! . . . I just noticed your example was for "hours" not "minutes".
    Whoops, you are right. Sorry about that, I am sort of drugged up at the moment from being in the hospital.

    Quote Originally Posted by GadgetBandit View Post
    IT WORKS!!! Thank you!!!

    Can I replace the "do function" with an "if" statement?

    Thank you,
    GadgetBandit
    You cannot replace the do statement with an if statement. The "if" is satisfied by time only.

    But what you can do is make the do statement change a variable. Then in the logic statements section use an if statement with the variable as well... a variable.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  2. #22
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    I fixed the code example to minutes as it should be.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  3. #23
    Low Bitrate GadgetBandit's Avatar
    Join Date
    Oct 2008
    Posts
    100
    Setting a variable is excellent.

    Glad your doing good.

    GadgetBandit

  4. #24
    Newbie
    Join Date
    Jan 2010
    Posts
    30
    Just looking for some help with the same basic functions. I'm trying to set a variable to true or false based on the clock. i.e. true for day and false for night.

    I can do the logic all night but coding is not my stronger point. How would I modify the above code posted above to set a variable as opposed to triggering an output?

  5. #25
    Newbie
    Join Date
    Jan 2010
    Posts
    30
    how do I use the time based code to set a boolean variable? I can't figure out how to set boolean variables, only numerical variables.

  6. #26
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    just use "true" or "false" instead of a number
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  7. #27
    Newbie
    Join Date
    Jan 2010
    Posts
    30
    I guess it really was that simple. I have it working perfectly now. I'm now looking for a 1 or a 0 when I check that variable in my other functions (and it works that way), would that be the proper syntax or am I going to check for a true or false specifically to do it properly?

  8. #28
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    true and false get translated into 1 and 0 anyways. Just leave it with numerics if you have it thatway already.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Indexing music in 1.0.9.8 Failed
    By hovalistic in forum StreetDeck
    Replies: 0
    Last Post: 07-07-2007, 12:19 PM
  2. Replies: 8
    Last Post: 06-02-2007, 09:49 AM
  3. who cares about the date and time? (POLL)
    By liquid_smoke in forum Road Runner
    Replies: 26
    Last Post: 08-10-2005, 09:34 AM
  4. Looks like the time has come to find another frontend
    By TucsonPred in forum Media Engine
    Replies: 4
    Last Post: 08-01-2005, 03:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •