Shop OBEX P1 Docs P2 Docs Learn Events
My Hover Craft - Page 2 — Parallax Forums

My Hover Craft

2»

Comments

  • MacGeek117MacGeek117 Posts: 747
    edited 2005-11-06 19:38
    Why not just go with DEBUGIN user(0)?
    RoboGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are 10 kinds of people in the world,

    those that know binary and those that don't.
    Formerly bugg.
    www.parallax.com
    www.goldmine-elec.com
    www.expresspcb.com
    www.startrek.com
    ·
  • Microman171Microman171 Posts: 111
    edited 2005-11-06 22:42
    sadly no it doesn't work cry.gif If the debugin command is like this
    DEBUGIN user(0)
    
    



    Then nothing happens. If it is like this
    DEBUGIN user(1)
    
    



    Then it has the usual problem of not stopping when I release the key

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1 + 1 = Window

    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    0............................................0
    0............................................0
    0.(Microman171@hotmail.com)..0
    0............................................0
    0............................................0
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  • Tom WalkerTom Walker Posts: 509
    edited 2005-11-07 18:51
    I think you are not taking into account what is really happening on BOTH systems. When you press a key on the PC, that key gets sent out ONCE on the PCs serial port (making certain assumption about your PC code). If it a simple "serial out" type of application, then it may start sending rapid-fire individual bursts of the character determined by your "auto-repeat" time and rate settings (again, making certain assumptions). In no case, is there any indication that a key has been released. Now take this info and think about what your Stamp "sees". It will either see a single character (again, without any indication that the character has been "released") or a series of the same character at the auto-repeat rate. As was suggested earlier, you will have to program the Stamp to "keep doing the last thing I told you to do" until it sees som indication that it needs to do something else...most probably, by seeing another command. Perhaps you should consider each command as a "start-only" command and assign a key to stop the current process. So you might press "a" once to turn left and then press "x" to stop that action when your 'bot is pointed the way you want. Press "w" to go forward and again "x" to stop.

    It is a very doable task, but perhaps a little more complicated than you perceive it to be because the PC doesn't send anything special when you release the key.

    HTH

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Martin_vLMartin_vL Posts: 18
    edited 2005-11-12 12:38
    Hello
    I have control my BoE-bot (picture on the left) with de bedug window of the basic stamp editor. It was working very good. But in the futere I think its better to control my BoE-bot with a Visual Basic program.

    The program I use:
    ···· Transmitter:
    ' Martin van Leussen - Control BoE-Bot Wireless - Transmitter.bs2
    ' Keys:            Vooruit
    '                    [noparse][[/noparse]w]
    '           links [noparse][[/noparse]a][noparse][[/noparse]s][noparse][[/noparse]d] Rechts
    '                 Achteruit
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
     
    Command VAR Byte
    counter VAR Word
     
    OUTPUT 0                      'Transmitter
     
    DEBUG "Welkom"                'Start a new Debug-Window
    
    DO
    SERIN 16, 16468, [noparse][[/noparse]Command]    'Recieving command from keyboard (with Debug)
    SEROUT 0, 17197, [noparse][[/noparse]Command]    'Transmitting (RF) too the BoE-bot
    LOOP
    

    Receiver:
    ' Martin van Leussen - Control BoE-Bot Wireless - Receiver.bs2
    ' Keys:            Vooruit
    '                    [noparse][[/noparse]w]
    '           links [noparse][[/noparse]a][noparse][[/noparse]s][noparse][[/noparse]d] Rechts
    '                 Achteruit
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
     
    command VAR Byte
    counter VAR Word
     
    INPUT 1
     
    DO
     
    SERIN 1, 17197, [noparse][[/noparse]command]
     
    IF command= 100 THEN
        PULSOUT 12, 800
        PULSOUT 13, 800
        PAUSE 20
    ELSEIF command= 97 THEN
        PULSOUT 12, 700
        PULSOUT 13, 700
        PAUSE 20
    ELSEIF command= 119 THEN
        PULSOUT 12, 650
        PULSOUT 13, 850
        PAUSE 20
    ELSEIF command= 115 THEN
        PULSOUT 12, 850
        PULSOUT 13, 650
        PAUSE 20
    ENDIF
     
    LOOP
    


    I like some reply for use Visual Basic to control my BoE-bot.

    Post Edited (Martin_vL) : 11/12/2005 12:43:31 PM GMT
  • Microman171Microman171 Posts: 111
    edited 2005-12-12 23:54
    Thanks for your help guys but the problem is I only have one stamp and it is on the transmitter side

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1 + 1 = Window

    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    0............................................0
    0............................................0
    0.(Microman171@hotmail.com)..0
    0............................................0
    0............................................0
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  • LightfootLightfoot Posts: 228
    edited 2005-12-13 03:37
    Try SX chips, they are cheaper then stamps and just as easy to program.
  • Microman171Microman171 Posts: 111
    edited 2005-12-16 08:23
    I cant get sx chips where I live in NZ freaked.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1 + 1 = Window

    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    0............................................0
    0............................................0
    0.(Microman171@hotmail.com)..0
    0............................................0
    0............................................0
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  • LightfootLightfoot Posts: 228
    edited 2005-12-17 01:39
    Please stop expecting people to write code for you! nono.gif That will get you nowhere! shakehead.gif Please take your time and learn visual basic.NET (not hard to learn) if you still plan on using it. For the basic stamp, keep experimenting. Keep your mind to this project and your nose on the proverbial grindstone. If you give up, that attitude will inevetibly doom you to failure in life. cry.gifdevil.gif

    I wish you the best of luck,
    Over and Out scool.gif

    Post Edited (Lightfoot) : 12/18/2005 8:47:41 AM GMT
  • Martin_vLMartin_vL Posts: 18
    edited 2005-12-17 09:49
    thx for the post tongue.gif

    Martin
Sign In or Register to comment.