Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp2 programming quesuions - - — Parallax Forums

Basic Stamp2 programming quesuions - -

HappynessHappyness Posts: 8
edited 2008-05-29 13:05 in BASIC Stamp
·····

··· ··Hello , I am a student in Taiwan.· I am a new user of·Basic Stamp2. I got some problems in using Board of Education (Serial).confused.gif
········

My problems :·····

······I want to make a auto-moving car, and I· shall to put a LCD module on it. The function of LCD
is to let someone who·use the·car set the·argument of time and the argument of distance by himself. yeah.gif

For instance, if it is static ,two·hours later,I do want to have it· move 200 centimeter in slow and constant speed.

How can I· set the arguments of time and distance in PBASIC ? Could you give me some tips?

··········If· I lacked some components what I need?· Please tell me.
········
········· Thanks a lot. &· Have a good day.·· ^_^
············································································································· ·Peter

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2008-05-25 21:01
    Peter,

    One possiblity is to use a potentiometer to set the time and distance as you've described.

    The Stamp command to look at at is RCTIME and its use is very simple. Have a look at the Help file under RCTIME for some sample circuits.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • HappynessHappyness Posts: 8
    edited 2008-05-26 15:18
    Tom , Thank you. ^^ Your reply is helpful.lol.gif

    Hi , all masters in robot .smilewinkgrin.gif Who can give me some inspirations ?

    I am only a beginner in Robot.·All i have is boe kit (serial) , 2 servos , one·ssc-32 card and parts of car.

    Now, teacher required , my work is to make my car move and stop under my control.(all ideas are ok!!·) <---at least shocked.gif

    The deadline is 7 days later .shakehead.gif

    who can do me a big big big favor?

    All replies are appreciated. ^^

    If my grammar is fault , please correct me. (Robot and English are both i have to progress.)·smile.gif



    ·
  • RickHRickH Posts: 40
    edited 2008-05-26 15:38
    As for grammar, I can understand you well. I think you need to work on the order of your words. An example of this would be -
    Peter said...
    If my grammar is fault , please correct me. (Robot and English are both i have to progress.)
    as oposed to
    Somebody said...
    If my grammar is faulty , please correct me. (I need to progress in both Robots and English.)

    [noparse]:)[/noparse]
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-26 15:39
    The Parallax forums are best for getting answers for specific questions or for help in understanding something.

    There are many sample programs and tutorials on Parallax's website and you should download some of them to use as a starting point for your project. The tutorials are found by going to the main Parallax web page, selecting the Resources tab, then choosing Downloads, then Stamps in Class Downloads. The "Robotics With The Boe-Bot" tutorial is a good starting point. Under the Resources tab, the Nuts & Volts Columns area is also very useful.
  • HappynessHappyness Posts: 8
    edited 2008-05-27 05:43
    To Rick : Thank you for your correct. I'll keep improving English.

    To Mike : The tutorial you recommanded is useful. i am reading it now.^_^ Thank you so much.

    Tom , sorry , i can't find RCTIME what you recommanded. Can you tell me how i can find it ?

    If someone who have good ideas for me , please reply it. Thanks.~~
  • ForrestForrest Posts: 1,341
    edited 2008-05-27 10:42
    RCTIME and all the Basic Stamp commands are covered in the Basic Stamp reference manual - downloadable here www.parallax.com/Portals/0/Downloads/docs/prod/stamps/web-BSM-v2.2.pdf
  • HappynessHappyness Posts: 8
    edited 2008-05-27 17:22
    Forrest , i found it. Thank u.smile.gif

    If someone who have good ideas to change my car into an auto-moving car ,·i'll appreciate it.^^

    ·
  • SandgroperSandgroper Posts: 62
    edited 2008-05-28 15:32
    Hi Peter,

    If you wanted the car to stay static for two hours before moving,·I suggest having a look at the PAUSE, NAP·and SLEEP commands in PBasic.· You can use these·with an appopriate·FOR / NEXT or DO WHILE loop to extend the times.

    One way to make the car travel a fixed distance is to make it move·at a constant speed for a fixed period of time.··This could be as simple as switching on the·drive motors, pausing for a few seconds, and then switching them off again.· You can do this with the PAUSE command if the distance doesn't have to be too accurate.·

    You could also use·an optical encoder to measure the distance travelled if you have one, but these are a little trickier to set up.
  • HappynessHappyness Posts: 8
    edited 2008-05-29 13:05
    To Sandgroper :

    ··· Your suggestion is helpful for me. I'll do what·u say in the near future. Because i am learning some base of microcontroller now.smilewinkgrin.gif
Sign In or Register to comment.