Shop OBEX P1 Docs P2 Docs Learn Events
Datalogger Distress -> Solved — Parallax Forums

Datalogger Distress -> Solved

SRLMSRLM Posts: 5,045
edited 2008-10-19 21:59 in BASIC Stamp
Hi. Well, I'll bite. I always seem to have trouble with the datalogger, and it never seems to be just right. However, I can usually fix any problems with enough contemplation and an Ah-Ha moment. Not this time: I can't seem to get it to read the file. I'm sure that the preparation is working since the light on the USB thumb drive blinks at that time, but nothing happens at the first read (line 100). I've reproduced it here:

  'To get the number of waypoints
  PAUSE 200
  SEROUT TX\CTS, Baud, [noparse][[/noparse]"RDF ", $00, $00, $00, $03, CR]
  SERIN RX\RTS, Baud, 62000, No_Data2, [noparse][[/noparse]DEC3 largeA]
  PUT 55, largeA

Anyway, the test program works, so I'm fairly certain it's not a hardware error. I'm using a BS2px. You can ignore the code at the begining: thats just so that I can choose the right action. When I run it, it goes through everything until it reaches the SERIN on line 101. It then times out and goes to the No_Data2 method. Even with the huge timeout counter I gave it.

Any suggestions?

Post Edited (SRLM) : 10/19/2008 2:02:07 AM GMT

Comments

  • SRLMSRLM Posts: 5,045
    edited 2008-10-16 05:08
    Three Months Later: Success!

    Any of you long time programmers know that euphoric sense that you get when you solve a problem that just didn't go away? Well, that's what I feel like. Yay!!!

    This issue has been a thorn in my side for months. I'd periodically get the nerve to pull out the platform and do some more testing, but it was always the same thing. Near the end, I was just repeating the same things over and over, and it was no wonder that they didn't work.

    Today, I took my BOE and laptop to the EE support lab, where electronics are piled high on every flat surface, and was looking for some inspiration. Guess I'll be going back quite often, since it worked.

    What was the problem? Well, it was one or two things (I was just messing around, without a real test plan): Either a) I cannot use a variable in the file name, or possibly I didn't do it right, or b) the DEC formatter kept the SERIN command waiting for a byte that never came.

    Anyway, I'm just happy (no, too weak a word: overjoyed, jubilant, ecastic would all be more accurate) that I've got this working. I've moved past my Achilles Heel, and will soon have a roving robot.

    Cheers mate, and Best to you and Yours!
  • steve_bsteve_b Posts: 1,563
    edited 2008-10-17 13:45
    Congrats SRLM....these are the moments you can't buy or beg for!

    This is why some folks on here tell people to read the manuals....sure, you might not get the answer you want right away, but by figuring out yourself, you'll remember it much longer!

    Now the trick is to not do too much at once....so you can remember the effective solution!

    Can you go back to the non-working program and try either of the suspect solutions and see which one was the fix!?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <FONT>Steve



    What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
    Lee Travino after the second time being hit by lightning!
  • SRLMSRLM Posts: 5,045
    edited 2008-10-19 00:01
    I think the problem was my DEC command held it all up, so I'll make sure to try that first next time.
    Anyway, ran into another snag. For some reason the program stops at the following SEROUT command:

    SEROUT TX\CTS, Baud, [noparse][[/noparse]"WRF ", $00, $00, $00, 12, CR, DEC2 buffer(0),":", DEC2 buffer(1), ":", DEC2 buffer(2), ",", DEC3 largeA, CR] 
    

    ·I can't think why. There's nothing really for the BS2 to wait for, except for possibly the flow control. Any guesses on how that mechanism works? Or possibly any other suggestions? The code is essentially the same as the first post.
  • SRLMSRLM Posts: 5,045
    edited 2008-10-19 01:59
    Nevermind.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-19 21:59
    Hooray! Happy for you. I will be tried to wire mine and get it working soon. Wish me such luck. It did not take me but a few minutes to get the SD card reading. Hope I have that kind of sucess with the datalogger.
Sign In or Register to comment.