New Zealand
Asked — Edited
Resolved Resolved by Rich!

Alarm Clock Script

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

=======================

No alarm needed

=======================

=======================

Is the time 7am hour

=======================

=======================

Is the minute 15

=======================

=======================

Sound alarm

=======================

=======================

Wait 10 sec

=======================


ARC Pro

Upgrade to ARC Pro

Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.

PRO
Synthiam
#1  

What are you trying to achieve? we will need more information:)

New Zealand
#2  

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

PRO
Synthiam
#3  

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:)

PRO
Synthiam
#4  

The most simple alarm is like this...


WaitUntilTime(8, 30)

Say("Wake up!")

otherwise, you can get creative like this example: WaitUntilTime.EZB

United Kingdom
#5  

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

New Zealand
#6  

Its getting there thanks Rich.;)