Shop OBEX P1 Docs P2 Docs Learn Events
help w/ programing bs2p — Parallax Forums

help w/ programing bs2p

edited 2009-03-24 21:17 in Robotics
· i'm triyng to write some pulsout commands for my robot and thru out the code have the bs2p display some messages on a parallax serial LCD as well as·sound some voice messages on the·parallax text-to-speech module.
· any help will be greatly appriciated.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-24 14:11
    I assume the PULSOUT statements are for servo motor control (you didn't say). If so, these pulses have to be produced about every 20ms or the servo motors will shut down and their movement will become jerky. At 9600 Baud, a SEROUT statement can send about 20 characters in 20ms which will leave no time for the PULSOUT or anything else in 20ms. You could possibly handle 5-10 characters total between PULSOUT statements. Your best solution would be to use something like a Parallax Servo Controller (PSC) or a ServoPAL. These take over the PULSOUT function and issue the pulse every 20ms. In the case of the PSC, you control it using a SEROUT statement. The ServoPAL you send the first pulse and it just repeats it until you change it. Read the documentation for these for details.
  • dandreaedandreae Posts: 1,375
    edited 2009-03-24 14:35
    Your duplicate post has been deleted.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support·
  • edited 2009-03-24 19:54
    ·i do have the servo controller board that you mentioned.
    · i think what confused me was the fact that i copied and pasted the·3 source code· programs, (the· servo,lcd and the speech board),all into the editor.
    · can i do that so it's easier for me or no?
    THANKS!!!·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-03-24 21:17
    No, you cannot do that. A program is written to perform a specific task. Adding more programs in doesn’t mean they will ever get created. On top of this you may have conflicting I/O pin assignments, constants and variable declarations.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.