Shop OBEX P1 Docs P2 Docs Learn Events
GPS Toy-Boat — Parallax Forums

GPS Toy-Boat

jhoyozajhoyoza Posts: 72
edited 2006-12-21 22:32 in BASIC Stamp
SexyandSmartsml.jpg

Hello,

To anyone interested I submitted my project to the Completed Projects Section of the forum, and I thank you all!

http://forums.parallax.com/showthread.php?p=621606

But, I’m never truly done. I’m wondering why when I simply unplug my BS2 and use a SX chip instead it doesn’t just work all by itself? Other than the processor speed and scratch pad memory, all else is the same?

Where’s the aspirin?

Thanks!

-J

Post Edited (jhoyoza) : 12/18/2006 2:47:23 PM GMT

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-12-18 08:45
    jhoyoza -

    It is not correct to just ask "Other than the processor speed and scratch pad memory, all else is the same?". The differences go a bit deeper than that. Since the processor speeds are different, you need to take that into consideration for any instructions in which timer units (aka duration) are involved, due tothe difference.

    PULSEIN / PULSOUT, PAUSE, PWM, COUNT, FREQOUT, SLEEP and SOUND and perhaps others, are all PBASIC instructions which include a DURATION parameter, and must be adjusted for the faster executuion speed. If you choose to avoid this problem now and in the future, you can start using conditional compilation which is a macro-like adjunct included in PBASIC which permists you (among other things) to check the Stamp type and set certain parameters (defined by you) as appropriate. Unfortunately, I don't have the link handy for the "standard" template which is often used, but I'm sure one of the other folks can provide it for you.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • jhoyozajhoyoza Posts: 72
    edited 2006-12-18 14:39
    Hello,

    Thank you for your fast response. Yes, Bruce, that makes perfect sense and I’m grateful for the heads-up. I’m going to try fooling around with that today.

    I’m unclear the meaning of, “start using conditional compilation which is a macro-like adjunct included in PBASIC which permits you (among other things) to check the Stamp type and set certain parameters (defined by you) as appropriate.“ Do you mean there is a command or sequence of commands that will recognize a particular stamp and adjust the program accordingly? If so, that’s great! But, my back is against the wall as far as remaining program-space and variables go and I couldn’t find that command(s) you speak of. However, I would definitely love to have more information on it.

    It is interesting to note, that each subsystem component (I wrote code for) works very fast if used alone in the BS2. As I combined the subsystem-codes into one large program, an obvious delay, or sluggishness is apparent. I’m curious why a small-closed-loop in the final program is not just as fast as before? Does the stamp carry the burden of all the code despite only using a small part of it? My program is very GOSUB dependant, so perhaps that’s contributing to the issue?

    I also have the phenomena that when the program is very large, it sometimes has difficulty uploading to the stamp. I keep getting “No BASIC Stamp Found” message. But if I’m persistent it eventually gets through. Sometimes I run a clean EEPROM program that has only one command in it. ‘END‘. It sometimes appears to help. Is this normal? I tried swapping out BOA boards and BS2 modules with the exact same results.

    A real nail-biter indeed.

    Thanks!

    Closeup.jpg
  • PARPAR Posts: 285
    edited 2006-12-18 21:15
    jhoyoza said...
    ...
    I’m unclear the meaning of, “start using conditional compilation which is a macro-like adjunct included in PBASIC which permits you (among other things) to check the Stamp type and set certain parameters (defined by you) as appropriate.“ Do you mean there is a command or sequence of commands that will recognize a particular stamp and adjust the program accordingly? If so, that’s great!· ...
    See http://forums.parallax.com/showthread.php?p=568694·initial posting by Jon Williams.
    PAR
  • jhoyozajhoyoza Posts: 72
    edited 2006-12-20 01:45
    Got yah!

    As a matter of fact I just received Jon William's book called Stamp-Works and I think it is great! The programming essentials is the best explanation yet about conditional loops that I have seen, and I’m very much interested in the LCD and voltage monitoring chapters.

    s145.photobucket.com/albums/r211/jhoyoza/?action=view&current=GPSRouteMap.flv

    Well I took the boat out again today and things didn’t go so well. The wind was so strong the boat could not navigate unless at full-speed. The program I have in it now, depending on the distance in angle from where you want to go, I run the motor anywhere from 25% to 90%. All that happened today is it got blown sideways all the way to the island! But, that’s OK, I had my trusty canoe and I went and rescued it. (It is not easy fighting the wind in a canoe either, especially with one person, as the front is up in the air and acts like a sail.)

    s145.photobucket.com/albums/r211/jhoyoza/?action=view&current=Windy.flv

    This makes me want to try adding a radio communication to the BS2 so I can change the program on the fly. As it now stands. I must bring it home, change the program, and then go back out. Way to much hassle. I do have a laptop, and perhaps I can utilize it in the field. (I simply would have adjusted the speed to full-speed-ahead, no matter the direction. I think.) However, I do find laptops cumbersome in a car environment.

    I was thinking of doing a night-run, but I think I better wait. But not to long, the ice is coming!

    I didn’t have a chance yet to modify the program for the SX-chip. Which reminds me…. I still have difficulty uploading large programs into the Basic Stamp. Today I received a new serial to USB adapter, and despite swapping out everything including carrier boards, BS2 chips, and now even the adapter, I still have to try multiple times before it takes?? Curiously enough, small program load first time every time.

    Has anyone else experienced this? Is there any suggestions on how to fix it? Is it a bug, or common place? The only thing left is to try a new cable.

    Any help would be greatly appreciated!

    Thanks,

    -J roll.gif
    448 x 336 - 106K
    966 x 720 - 43K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-20 14:58
    jhoyoza said...(trimmed)
    Which reminds me…. I still have difficulty uploading large programs into the Basic Stamp. Today I received a new serial to USB adapter, and despite swapping out everything including carrier boards, BS2 chips, and now even the adapter, I still have to try multiple times before it takes?? Curiously enough, small program load first time every time.
    Has anyone else experienced this? Is there any suggestions on how to fix it? Is it a bug, or common place? The only thing left is to try a new cable.
    Hello,
    ·
    ·· Which USB to Serial Adapter are you using?· Is this on a Laptop or Desktop?· Often there are settings in the Device Manager you can set to correct these issues.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • jhoyozajhoyoza Posts: 72
    edited 2006-12-20 17:53
    Hi Chris,

    Thank you for responding. I just recently received Jon William’s book and he briefly emphasizes using the FTDI VCP driver when using USB interface. I reinstalled the driver (I wonder if it was there already?)….and I’m embarrassed to say, it appears to have fixed the problem….Maybe I got lucky? Still, I would be interested in device manager settings if you still think I should check them.

    Again, thanks for your support!

    -j

    P.S. To those interested I made a demonstration video on the radio get-up. I use different colored LEDS for visual indicators. I now changed the speed parameters so when it goes into GPS mode there is a definite increase in motor RPM. An inversely, a reduction when switching back to manual control. I may add a bright light so I can easily see the mode change also in the field. A sudden increase or decrease in speed is my only indicator now. (Along with pressing and praying.) You may notice the sluggishness in response and realize why I want to upgrade to an SX.

    s145.photobucket.com/albums/r211/jhoyoza/?action=view&current=MODESandLEDS.flv?t=1166635433
    644 x 480 - 73K
    644 x 480 - 74K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-20 20:08
    I would recommend downloading the latest drivers (installer) from our website if you have not done so already.· It should update the drivers only if they need it.· You may have to restart after the installation is complete.· In any event, at the bottom of the page is a troubleshooting guide that lists the settings I refer to.· I hope this helps.· Take care.

    http://www.parallax.com/html_pages/downloads/software/ftdi_drivers.asp

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • jhoyozajhoyoza Posts: 72
    edited 2006-12-21 22:32
    Well the ice is here. Looks like the boat-testing may be put on hold for the season. I have seen it work (good enough) and it is now time for a new platform. GPS guidance may not be nothing new, but it sure is a lot of fun! And yep, new drivers loaded everything working fine. Thanks!

    OhNoIce Video:
    s145.photobucket.com/albums/r211/jhoyoza/?action=view&current=ohnoice.flv

    Although sections of the pond was still unfrozen, there was just to much risk in trying to remain in a small area using GPS mode and I would have had to go home and reprogram it all again! To risky, as I didn't know exactly where the ice was or wasn't. So I drove it around manually anyways, and actually used it to break up some of the ice! (Just asking for trouble there.)

    IceBreaker Video:
    s145.photobucket.com/albums/r211/jhoyoza/?action=view&current=ICEBREAKER.flv

    I did get to have my night-ride under manual control and I really enjoyed it! With the lights you can determine which way the boat is pointing even at great distances. (It does show a bit on video.)

    Nighttime Video:
    s145.photobucket.com/albums/r211/jhoyoza/?action=view&current=nightride.flv

    New platform considerations:
    Must be able to use large open spaces as my GPS can be off anywhere from 3-60 feet.
    Must be all terrain as ice turns to snow which turns to foot prints…etc….(I’m figuring just using the pond again.)
    Must be able to maintain at least 1 MPH as my the GPS can not send data below that.
    Must be relatively stable at low and high speeds. (Faster the better for GPS reception)
    Must be capable of running for a couple of hours to be worthwhile.
    Must be capable of carrying substantial weight as larger battery packs may possibly be required.
    Must be recoverable and as least-dangerous to people and property as possible. (Aircraft is out of the question as anything I build is just to unreliable to say the least.)
    Must be as inexpensive, and 99.9% assembled.

    Geee….I don’t ask for much…now do I?

    I’m thinking 4WD Monster truck with real suspension and perhaps spiked tires (for ice). I have yet to see a R/C snow-mobile. Perhaps even a gas-powered vehicle may be justified as much more energy will be required and they have better operational longevity. Maybe and electric plastic type kids-rider-toy as they are relatively cheap, large, heavy and perhaps powerful enough? My kid had one that did 3MPH in fast mode. (I think) I wonder if one of them is actually 4W Drive? Any other ideas? Suggestions?

    Prepare for the Ice-Age! smurf.gif

    Thanks!
    1288 x 960 - 130K
    1546 x 1152 - 116K
Sign In or Register to comment.