Shop OBEX P1 Docs P2 Docs Learn Events
BS2 and StampDock - how to use the gettime command? — Parallax Forums

BS2 and StampDock - how to use the gettime command?

IceFireProIceFirePro Posts: 86
edited 2010-06-28 14:03 in BASIC Stamp
Hi, reading the help does not work at all. Can someone help me with a sample bit of code?

Comments

  • sumdawgysumdawgy Posts: 167
    edited 2010-06-11 11:33
    I hate to sound evil..but you need to post the code you're attempting to use... [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
  • FranklinFranklin Posts: 4,747
    edited 2010-06-11 14:47
    Somebody said...
    Hi, reading the help does not work at all. Can someone help me with a sample bit of code?
    You need to help us if you want help. How do you know it does not work? What have you tried that didn't work? What are you trying to accomplish. You really need to read and understand the forum rules before posting all these open ended questions. Personally it is getting annoying.

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

    Post Edited (Franklin) : 6/11/2010 2:52:34 PM GMT
  • IceFireProIceFirePro Posts: 86
    edited 2010-06-11 18:48
    I tried this, I know it's probably very far from what I should do:

    x VAR Byte
    DEBUG "?t0;"
    SERIN 16, 16486, [noparse][[/noparse]X]
    PAUSE 2
    DEBUG DEC x

    The result is not the time, but unrecognizable characters.
  • hover1hover1 Posts: 1,929
    edited 2010-06-11 20:08
    I guess you would have to ask the author of the program. It's not a Parallax product, so you are looking in the wrong place for an answer. And because it just came out, I doubt anyone here has used it yet.

    Post Edited (hover1) : 6/11/2010 8:32:03 PM GMT
  • APSpijkermanAPSpijkerman Posts: 32
    edited 2010-06-28 14:03
    Hi

    I kind of missed this forum thread, just saw it for the first time.

    First, there was a small bug in the previous StampDock version .. as time in mode 1 gave
    the same result as time in mode 0.
    It's fixed in the last version you can download at http://apsdev.com/stampdock/

    Also i has some nice new features.
    Like it now has serial receive and transmit indicators.
    It has round knobs you can turn around in the GUI and use as input and output.
    You can now have multiple graphics objects, and there are more commands to do
    operations on a whole graphics object, like scroll in any direction, flip it around its
    axis, invert it .. make it lighter or darker etc.
    Also you can have multiple video objects, and they have more options.
    Now you can also load pictures like JPG, PNG, GIF etc in the video object,
    they will be scaled to the size of the video object and there 8 different fade
    methodes so the previous picture will fade into the next.
    You can now send data in binairy mode to the stamp.
    And if commands require large pieces of text, you can replace them by a number
    and put the text in a "phrasebook" file on the host system.
    So you can fit more code in the basic stamp memory.



    This is the piece of code i used to test time in mode 1:

    y2 VAR Byte
    y1 VAR Byte
    m VAR Byte
    d VAR Byte
    h VAR Byte
    mi VAR Byte
    s VAR Byte
    t VAR Byte

    DEBUG "?t1;" ' returns 8 bytes with the time

    SERIN 16, 16468, [noparse][[/noparse]y2] ' 9600 baud for BS2 , BS2e and BS2pe
    SERIN 16, 16468, [noparse][[/noparse]y1] ' 9600 baud for BS2 , BS2e and BS2pe
    SERIN 16, 16468, [noparse][[/noparse]m] ' 9600 baud for BS2 , BS2e and BS2pe
    SERIN 16, 16468, [noparse][[/noparse]d] ' 9600 baud for BS2 , BS2e and BS2pe
    SERIN 16, 16468, [noparse][[/noparse]h] ' 9600 baud for BS2 , BS2e and BS2pe
    SERIN 16, 16468, [noparse][[/noparse]mi] ' 9600 baud for BS2 , BS2e and BS2pe
    SERIN 16, 16468, ' 9600 baud for BS2 , BS2e and BS2pe
    SERIN 16, 16468, [noparse][[/noparse]t] ' 9600 baud for BS2 , BS2e and BS2pe

    PAUSE 2 ' millisecs

    DEBUG " date month " , DEC m, " day ", DEC d, "hour ", DEC h, " minute", DEC mi," secs", DEC s, " ticks ", DEC t, " <- " , CR
    DEBUG " time hour ", DEC h, " minute ", DEC mi," secs", DEC s, " ticks", DEC t, " <- " , CR
    DEBUG "Year ", DEC y2 * 256 + y1 , " <- "
Sign In or Register to comment.