Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 18th, 2024, 9:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Wanting to build a basic alarm clock
PostPosted: February 25th, 2015, 10:48 pm 
Offline

Joined: April 5th, 2008, 2:41 pm
Posts: 102
Location: Sydney
Opus: Opus Pro Edition 9.51
OS: Windows 8.1
System: Acer Aspire V touch screen edition 4G RAM
Hi...
I know there have been a few timers and things available for opus Pro for a while
- but as far as I know ( unless I missed one ) they all require understanding "script".

I'm using Opus Pro 9.51 and am wanting to make a simple alarm clock.

I guess its a case of...when it gets to a particular time "do something "...

I'd like to be able to achieve this without script - I've tried many times to do this
but cant get anything to happen. - Ive tried tickers and such and set a variable to look for that
pre-set number or text or " contains "...but no matter what I try - it just keeps counting past
and nothing happens.

Of course I'd eventually like it to do something when it reads the " system time " but hey!
thats 1 test every 24 hrs to see if I got it right lol!

The other point is that since we've now reached Version 9.51 - I think it should be worth a
"fresh look " at timers and ways this new version can be utilized considering its many new features.

any Help MOST welcome - and thanks. :D

_________________
Acer Aspire V touch
Opus Pro 9.51


For this message Viper4054 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Wanting to build a basic alarm clock
PostPosted: February 26th, 2015, 10:15 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
An alarm clock doesn't need scripting, Opus already has three system variables that get the local clock for the hours; minutes and seconds. Just use a frequent enough ticker with a nested IF action to check the minutes then the hour and perform your action.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


For this message mackavi has been thanked by : Viper4054


Top
 Profile Visit website  
 
 Post subject: Re: Wanting to build a basic alarm clock
PostPosted: February 26th, 2015, 10:56 pm 
Offline

Joined: April 5th, 2008, 2:41 pm
Posts: 102
Location: Sydney
Opus: Opus Pro Edition 9.51
OS: Windows 8.1
System: Acer Aspire V touch screen edition 4G RAM
MUCH and MANY thanks Mate!..

I still have some crazy issues and questions though regarding this timer.

How I have managed to do it at the moment is like this:

( rectangle )

----------------------------------------------------------
|<------------------------[] ----------------------->0 |
----------------------------------------------------------

the trigger is the rectangle the ball is on the right as a( zero )


I ended up having a ball move left to right through a trigger
that adds +1 to a variable and display it on screen.

So, if I want to create a 1 second trigger - I have the ball
move from left to right ( and back ) in 2 seconds - obviously,
the time in between is a 1 second increment each side. :wink:

But there is a problem! - I HAD to do this because if I use the model underneath,
- even though the " trigger " or collision is at one end of the rectangle... it counts
2 instead of 1 ! ( but doesn't seem to do it if the trigger is in the middle! ) now I KNOW
there is a collision enter AND an exit ...and have made sure that I ONLY use one OR the
other...but it STILL counts 2 - unless I do it the way I did above.

( in other words using collision enter by itself will STILL register an EXIT &
Visa-verse...cant understand why? I "check " to make sure there is ONLY one collision
command but regardless it reads both an IN AND an out )... - weird :?:


( rectangle )

----------------------------------------------------------
|[] <----------------------------------------------->0 |
----------------------------------------------------------

trigger ball

Next of all I cant seem to get my head around "Tickers" properly in relation to

System variables HRS : MIN : SEC - for example...in the above case its easy...
my variable reads and updates....but if I say Ticker1 = System Seconds ...
nothing happens. :(

So, is there a way for me to make it count directly from the systems Hours Mins seconds?

Ive tried this but it doesn't work....

I created a variable called " secount " - and set it to a value of the number "0"

I then created the statement: secount = SYSTEM_TIME_SECOND.....
....but there seems to be no updating of the " secount " variable.

Ive tried to get the thing to count DIRECTLY from " SYSTEM_TIME_SECOND "but nothing either.

But if I use the model above - then I get a regular trigger. - why cant I use SYSTEM_TIME_SECOND
as a variable to update "secount" and yet exactly the same thing ( only using my model ) works?

Sorry about the long winded explanation..but I really hope you can make sense of what I'm trying to
figure out.


I HAVE managed to connect directly to system_ hour Min Second and crate a simple clock based on the systems settings ( THANK YOU! )


In my first model I created a variable that counted....when it got to ( 30 ) test would pop up and say ( you have 30 seconds left )...
so I have figured out how to make SOME things do other things.

Have you seen those electronic clocks where instead of a second hand OR a display, there are LEDS that are around the edge of the face
of the clock and one lights up every second to represent " seconds" instead? - well Im trying to achieve the same thing but I cant get that to happen.
I thought that if I used the same principal ( when time counter = 30 show DOT 1 )..it would work but apparently not. :(

ADDITIONAL QUESTION: - how would I make this happen?....

Ive tried:

on show
SYSTEM_TIME_SECOND
IF SYSTEM_TIME_SECOND=1
THEN SHOW DOT1

IVE ALSO TRIED:

SYSTEM_TIME_SECOND=SECONDSTIME
IF SECONDSTIME=1
THEN SHOW DOT1

Neither works...is the logic correct or am I missing something? and if so how would you do it?
And once again thank you very much for the previous help.

_________________
Acer Aspire V touch
Opus Pro 9.51


For this message Viper4054 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Wanting to build a basic alarm clock
PostPosted: February 27th, 2015, 9:49 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Attached is a simple action based alarm clock. It's gets the system value onShow and passes them to the internal variables for use in the one second ticker. This allows you to check other events within the 'ticker' such as an alarm and your LEDs.

The LEDs would probably need something like a SELECT CASE (or lots of IFs) action within the 'ticker' action where you SELECT the mySecond value and then have 1-59 as the CASES that light the corresponding LED and CASE 0 as the reset to off.

</mack>


You do not have the required permissions to view the files attached to this post.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group