Shop OBEX P1 Docs P2 Docs Learn Events
say it module => How working with self made GROUPS??? — Parallax Forums

say it module => How working with self made GROUPS???

svenssonsvensson Posts: 11
edited 2009-11-25 05:41 in BASIC Stamp
Hello,

I've bought a bs2 stamp with BOE board and SAY IT MODULE.

But when I make one trigger word ( robot ) and 1 group ( with words ON and OFF ), The code ( say it module )·can only see·the trigger word "robot".

It cannot see the "ON" and " OFF" commands????

I want to say : ROBOT-->ON ( to set led on pin 15 )
···················· ROBOT-->OFF ( to set led·off on·pin 15 )

A code snippet:

VR_Action:
· DEBUG "got ", DEC VRCOMMAND
· SELECT VRGROUP
··· CASE GROUP_0
····· SELECT VRCOMMAND
······· CASE G0_ROBOT
········ PAUSE 0 '-- write your code here
····· ENDSELECT
··· CASE GROUP_1
····· SELECT VRCOMMAND
······· CASE G1_ON
········ PAUSE 200 '-- write your code here
········ HIGH 15
······· CASE G1_OFF
········ PAUSE 200 '-- write your code here
········ LOW 15
····· ENDSELECT
· ENDSELECT
· RETURN
'=== VR Routines ===


Thanks,

Sven

Comments

  • JDJD Posts: 570
    edited 2009-11-25 05:41
    Sven,

    The reason why it's not recognizing the other commands programmed, is the group the module is in only has the trigger command(s). So once the trigger command is met you will be prompted to insert some code; you will want to change the group to the new group if you have another group to use. In the beginning of your program there is a command to set VRGROUP = 0, that is the variable that will need to be changed to get to other groups. Otherwise, you can post the whole code using the attachment manger to be reviewed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Respectfully,


    Joshua Donelson
    www.parallax.com
Sign In or Register to comment.