Shop OBEX P1 Docs P2 Docs Learn Events
SayIt Module — Parallax Forums

SayIt Module

navychiefnavychief Posts: 40
edited 2011-04-11 05:38 in General Discussion
I'm currently looking for a solution on how to fix the connection problem with GUI application and the BS2 with SayIt Module. I'm always receiving timeout error and cannot connect to the stamp kit. Thank you.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2011-04-06 20:02
    Could you explain what you are talking about? What you have, how it is connected, what code you are using, what results you get.
  • navychiefnavychief Posts: 40
    edited 2011-04-06 20:12
    First off, I downloaded the .bs2 file for SayIt Module from parallax then downloaded and open in computer the GUI application, then try to click connect on the GUI application after following the directions (close stamp editor that is using COM port) but the application is giving me time out error. Attached is the sample bs2 codes. I caan't attached the GUI application but it's downloadable through parallax. Thank you
  • Martin_HMartin_H Posts: 4,051
    edited 2011-04-06 20:14
    How are you connecting the Sayit Module? The GUI is expecting it to connect to pins 0, 2, and 4. When used with the Board of Education it plugs into the app mod socket for a fairly goof proof connection.
  • navychiefnavychief Posts: 40
    edited 2011-04-06 20:38
    I connected it to 2,3,4 and I changed the PIN on the codes too. Is it wrong? Attached is the screenshot of the error.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-04-06 20:45
    I don't have the GUI in front of me right now, but it downloads a bridge program to the BS2 for programming. It also generates source code for you to use as the basis of your program. Where did you change the pins to 2, 3, and 4?
  • navychiefnavychief Posts: 40
    edited 2011-04-06 20:49
    It's working now! Another lesson learned today. Thank you for the quick response.
  • navychiefnavychief Posts: 40
    edited 2011-04-06 20:50
    Thanks, Martin. I reconnected it to where it's supposed to be. I'll continue working with the GUI now. Thank you again.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-04-07 05:55
    Great. Glad to be able to help.
  • navychiefnavychief Posts: 40
    edited 2011-04-07 19:38
    Ok...Now I got the GUI to work, I need help with the attached codes to use the commands in group 0 and group 1 under VR_Action to turn LED1 ON and OFF. My main goal is to simplify this codes just to turn ON and OFF LED1 when I say certain commands. Thank you.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-04-08 06:16
    The way the SayIt works is by having groups of words. Some groups of words are speaker independent, and some are trained via the GUI. The GUI emits a shell which contains constants with the symbolic names you entered in the GUI. But the next question is what to do with the code it spits out.

    First you need to keep in mind that the SayIt only listens to one word group at a time. So you start with group zero as a means of getting the SayIt's attention, then you swap word groups to a command word group. This implements a primitive grammar of sorts with an example of "Robot, On" or "Robot, Off". While you can put multiple commands in group zero (like on or off), that's a bit risky because the robot would respond to it out of context. For example "Please, take off your shoes and put on these slippers"

    In looking at this code I think you added GO_POWER and G1_OFF, correct? The problem is those two commands should both be in the same word group to implement a grammar as I suggested above. With regards to the code, it's been a few months since I programmed the SayIt, so I am rusty. I won't have time to brush up this weekend due to work, but I can help with that when I get some time.

    First things first. Sketch out the grammar you want to use, then the code follows. Also you multiple posted and should probably delete the duplicate.
  • navychiefnavychief Posts: 40
    edited 2011-04-08 15:15
    Thanks Martin. Have a nice weekend.
  • navychiefnavychief Posts: 40
    edited 2011-04-10 11:43
    Problem with attached codes: The LED1 turns ON after the trigger command.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-04-10 13:31
    Congratulations. It looks like you got it working.
  • navychiefnavychief Posts: 40
    edited 2011-04-10 14:24
    Actually it's not. It should wait for the next command after the trigger command, right? As of right now it's turning ON LED1 right after trigger command. Do you know where is the discrepancy on this codes? Thank you.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-04-10 18:00
    I read through the code. The reason it is turning the LED on right after the attention command is recognized you fall through to the action loop. Usually in the vr_loop after you've recognized the trigger command you set VRA1 to the group value (GROUP_1 in your case) and GOSUB VR_RecognizeSD. It will return with the value of the action which you then goto VR_ACTION to dispatch.
  • navychiefnavychief Posts: 40
    edited 2011-04-11 05:38
    Thank you very much, I'll make the corrections and run it again.
Sign In or Register to comment.