Shop OBEX P1 Docs P2 Docs Learn Events
code correction for error message — Parallax Forums

code correction for error message

milton hachemilton hache Posts: 6
edited 2009-03-07 15:28 in BASIC Stamp
I am writing a code for launching a rocket that will reach an altitude of about 60 feet.
Then when the rocket reaches it highest altitude the rocket engines will impulse a set of parachutes to slow down its falling. When the parachutes are activated this will automatically close a switch that will send a signal to the BS2 on PIN15.
The BS2 after receiving the signal on PIN15 should wait about 5 seconds to let the rocket stabilize. At this point I want the BS2 to start reading the altitude signal from the EZ4 Maxsonar form PIN3. At an altitude of 20 feet or less the BS2 will activate a switch to jettison the parachutes on PIN14, and then after about 2 seconds activate a switch to turn on a set of retro rockets on PIN13. ·End of code.

Post Edited By Moderator (Joshua Donelson (Parallax)) : 3/9/2009 10:46:39 PM GMT

Comments

  • milton hachemilton hache Posts: 6
    edited 2009-03-07 01:09
    The subject is code correction for error message.
  • FranklinFranklin Posts: 4,747
    edited 2009-03-07 02:15
    Click on the pencil icon in the upper right of your message and it will allow you to add a subject.

    ·You need to do some more reading on the syntax for pbasic and find out what the maxsonar will give you as outputs and how to communicate with it. If you have specific questions on your code please ask.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen

    Post Edited (Franklin) : 3/7/2009 2:23:23 AM GMT
  • metron9metron9 Posts: 1,100
    edited 2009-03-07 07:22
    and then after about 2 seconds activate a switch to turn on a set of retro rockets

    Won't that be a little late?

    Imagine you are on top of a tall building and holding a bowling ball over the side of the building. At time t = 0 seconds, you let go of the ball.

    At that exact moment, the ball is traveling at 0 ft/s, but as the ball experiences gravity without your holding it, it starts to fall.

    ]After one second, the ball will be traveling 32.2 ft/s.

    After two seconds, it is traveling 64.4 ft/s, and

    after three seconds, it is traveling at 96.6 ft/s.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • milton hachemilton hache Posts: 6
    edited 2009-03-07 15:28
    the time is just an example. I can change the time if needed.

    What I need help is with the program to do what I need and to be writeen properly.

    Thanks for your suggestion.
Sign In or Register to comment.