willgame2
New Zealand
Asked
— Edited
Resolved by Rich!
Hi I'm trying to finish my alarm clock script using script manager and I don't know what to do can anyone help me please? Here is a copy of my alarm scripting...
Jocasta Nu alarm clock v1.0
By William Chase
=======================
Assign system variables
=======================
System variables program
:variables $Count=0 $Name="William" $Robot_name="Jocasta Nu" $m=0 $h=0 $daytime="unknown" $nighttime="unknown"
=======================
Check the time
=======================
:Check_the_time $h=$hour $m=$minute Print("Hour = $h") Print("Minutes = $m")
=======================
Is it nightime
=======================
IF ($h19) $nightime="yes" ENDIF IF ($nighttime="yes") Print ("it is nighttime") ENDIF
What are you trying to achieve? we will need more information
I'm trying to create an alarm clock script to help with my project. I know what to use and stuff, but I need to see of I can create a script for the section for "No alarm needed" but I don't know what to put... stress
Sorry, I mean we need to know what it's supposed to do. like is it playing sounds? Does it matter what day or time? Is it enabled by a speech command? Or a joystick button? Tell us what you are in visioning
The most simple alarm is like this...
otherwise, you can get creative like this example: WaitUntilTime.EZB
Personally I like to use the hour, minute, second, day, month & year variables over WaitUntilTime, it's more coding and possibly takes more processing power but the script can then be "multi-purpose" triggering other scripts to start or stop as necessary.
I knocked up a speak time project on the cloud a few weeks ago which splits the time in to the various sections such as morning, afternoon, evening and night and also splits the minutes up so it know if to say "$minute minutes to $hour am/pm", "$minute minutes past $hour am/pm" or "$hour $minute am/pm"
That script should hopefully aid you in an alarm function. Use the idea behind splitting the day in to sections for the various alarms and replace the SayWait commands for ControlCommand commands to trigger "alarm actions"
The project is here
Its getting there thanks Rich.
thanks rich..