Shop OBEX P1 Docs P2 Docs Learn Events
Say it module — Parallax Forums

Say it module

nihalnihal Posts: 8
edited 2012-06-15 06:26 in Accessories
Hi


I am using the Say-It-Module on parallax boe-bot,for moving the servo motor by built -in command in say it module.

the problem that i can't give the boe -bot any other orders when boe-bot really move.

_thanks waiting for reply _

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-06-13 00:40
    The BS2 can only do one thing at a time so you'll need to have your BOE-Bot stop and listen to the SayIt between move.
  • nihalnihal Posts: 8
    edited 2012-06-13 04:11
    ___Thanks for reply___

    but if the BS2 can only do one thing at a time how i can use the infrared sensor in the same time that servo move?


    nihal
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-06-13 09:41
    While the BS2 can only do one thing at a time, it can do things that take a short amount of time one after another so it can seem like they are occurring at the same time.

    The servos need to be refreshed 50 times a second. There's time in between these refresh pulses to do other things like read an infrared sensor.

    I doubt it's possible to read from the SayIt within this short time period since I don't think the SayIt has any flow control to tell it when the BS2 is ready to receive the serial information from it.

    It has been a while since I've used a SayIt module, but from what I remember (and just now looking at the datasheet), I don't know if there's a way of communicating with the SayIt and at the same time drive the servos.

    The BS2 doesn't have a serial buffer so it has to be listening to the serial line to receive information from the SayIt.

    I haven't used the SayIt with a BS2 myself. I've used it with a Propeller which can listen to the serial line and drive servos at the same time. I think you might have trouble using the SayIt while servos are moving anyway since the noise from the servos would likely interfere with the SayIt's ability to hear commands.

    You might want to add parameters to your commands.

    For example, instead of a "forward" command, use "forward, six", to tell the robot how far forward to travel.

    You could either use a fixed number of digits when you want a number to be received, or I've wondered about using the word "ten" as a way to tell the robot I'm done saying numbers.

    So if I wanted the robot to rotate 45 degrees, I'd say "robot, turn, right, four, five, ten". I'd of course have to have the robot programmed to switch between word groups after the appropriate word.

    Alternatively, you could have the robot listen for a set number of digits. If I were to use a set number of digits, I'd probably use three digits for turns. My rotate command would then be "robot, turn, right, zero, four, five".

    With parameters added to the command, you could better control the path of the robot. This isn't as convenient as being able to give the robot commands on the move, but I think you could still have pretty good control of your robot this way.

    You could still use other sensors that could be quickly read to provide input for your robot so it wouldn't bump into things.
  • nihalnihal Posts: 8
    edited 2012-06-14 02:38
    that is good idea of using numbers ,but i think that i can use loop to make BS2 check if i am talking or not , i don't know if that possible or not ?

    (i mean that if robot is going forword ,it just stop a little to check if i am talking or not,if there is not it keep moving forword)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-06-14 06:57
    nihal wrote: »
    (i mean that if robot is going forword ,it just stop a little to check if i am talking or not,if there is not it keep moving forword)

    I think that's the way you'd need to do it. I think you'd have to time your talking to match the robots stops.
  • nihalnihal Posts: 8
    edited 2012-06-14 15:13
    thanks Mr :duane degan for your help but i have onther question, why say it module have problem when i am saying the trigger word in the first----

    "I mean it take long time to hear the word 'robot 'and somtimes it dosn't make any response "

    and that can't be happen when i presenting my project
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-06-14 15:46
    nihal wrote: »
    I mean it take long time to hear the word 'robot 'and somtimes it dosn't make any response

    Have you tried using the SayIt with the GUI program and with the BS2 running the bridge program?

    The GUI will let you see if the SayIt is recognizing the commands.

    Another thing that would likely help would be to post your code to the forum so we could see if there's a problem with it.
  • nihalnihal Posts: 8
    edited 2012-06-15 06:26
    Yes ,iam using GUI program with the BS2 ,but the version of GUI that i dawnload from parallax have somthing wrong " it generate wrong code ", so i use the code demo from parallax which is working ,but it just take long time (to response to trigger word) ,any way i attach to you mr:duane the parallax demo code and olso the say it GUI version 1.1.5,and the gnerated wrong code
Sign In or Register to comment.