Shop OBEX P1 Docs P2 Docs Learn Events
RoboGames 2007 Scrolling LED Medal - not displaying robots? — Parallax Forums

RoboGames 2007 Scrolling LED Medal - not displaying robots?

T&E EngineerT&E Engineer Posts: 1,396
edited 2007-07-01 19:27 in General Discussion
I received·a 2007 RoboGames Scrolling LED Medal last week from Parallax (along with 2 of the required batteries). However, the picture indicates the 2 Robots but my medal does not show them.

When I power it up, I hear the·sound demo·and then it starts scrolling Parallax ....something and then the letters of the alphabet (I beleive). It repeats this but I never see the robots come on.

I assume I can reprogram it with the code from the Parallax site (using only the 2 required batteries).

What is going on here?·Is there another version of the code loaded into my medal?

http://www.parallax.com/detail.asp?product_id=28099


·

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-06-27 15:09
    Who said they'd have anything programmed?·

    It comes with a header for the SX-Key on-board.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-27 17:18
    Timothy,

    The code that is on the Medals is the test code installed during manufacturing…The source code is freely available and includes the little robots. You can download this code from the following page. Take care.

    http://www.parallax.com/detail.asp?product_id=28099

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-06-27 17:36
    Thanks for the info!

    I will do that tonight.
  • DosManDanDosManDan Posts: 179
    edited 2007-06-27 22:58
    I can't believe I forgot the batteries....just ordered two of these.

    Dan
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-06-29 00:58
    I downloaded the Parallax code but it did not compile. It had a problem with 2 lines referencing Display(15).

    Display(15) = NextChr(0)

    and

    Display(15) = %00000000

    ====================

    I fixed·the program·by changing the dimensioning statement.

    Display VAR Byte (15)

    into·this....

    Display VAR Byte (16)


    Does this sound correct?

    Does the SX28 have a 0 to 15 array or a 1-16 array?

    Post Edited (T&E Engineer) : 6/29/2007 1:30:17 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-29 14:30
    Timothy, which version of the editor and compiler are you using? The current code was tested using SX/B version 1.51.07 on V3.2.3 of the SX-Key IDE.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-06-29 14:39
    Chris,

    See the picture. I·was chosen as an·SX/B Beta Tester.

    I have updated the picture to show working vs original code.

    Post Edited (T&E Engineer) : 6/29/2007 2:53:10 PM GMT
    2560 x 1024 - 325K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-29 14:47
    This might be something for Terry/Bean to have a look at.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • BeanBean Posts: 8,129
    edited 2007-06-29 14:54
    Looking at the code the Display array is declared as Byte(15) which means the elements are from 0 to 14. But then at places in the code they are using Display(15) which doesn't exist.

    The code will work because the memory location where Display(15) would be is not used by anything else. But the new compiler errors if you try to use an array element outside of the bounds.

    You have done the right thing by changing the declaration to Byte(16). That will solve the problem.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    “The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • JonnyMacJonnyMac Posts: 8,947
    edited 2007-06-29 15:25
    SX/B arrays are zero indexed; the display is 15 pixels wide so the columns would be indexed 0 to 14.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-29 16:05
    Okay guys it looks like I’ll have to give the code a once-over again. Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • BeanBean Posts: 8,129
    edited 2007-06-29 16:45
    Chris,
    It looks to me that the "j" loops should only go to 13 and the "Display(15)" lines should be "Display(14)".
    But that's just a quick read thought, I don't have a metal handy to try it.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    “The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-29 16:53
    Bean, I will verify this and get the correct code posted. Thanks for your input.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • JonnyMacJonnyMac Posts: 8,947
    edited 2007-07-01 15:56
    After spending some time with David's code I was able to get the text scrolling algorithm straight (in my own head) and add it to my version of the program. This version supports characters from $20 (space) to $7F (arrow; non-ASCII), and will scroll text left or right. The character maps for $20 to $7F are stored in contiguous DATA statements which makes access them quite straightforward. The program uses current SX/B standards encapsulating features into subroutines so they can be used very easily.

    The text scrolling routines, SCROLL_LF and SCROLL_RT, can use inline strings or strings stored in DATA statements. If the DATA statement is used then you can embed a bell character (#7) into the string and the beeper will beep at that point while retrieving the next character (the beeper runs in the ISR). You can also embed a CLS (#12) character into the string. Scrolling speed is controlled with a variable so you can adjust this parameter before putting text on the screen.

    This version of the program takes advantage of a subtle feature in SX/B: you can pass five parameters to a subroutine (or function) -- yes, five. To do this, however, you must pass exactly five (and the SUB or FUNC has to be defined that way). When this is the case the register that usually holds the parameter count (__PARAMCNT) is used as the fifth parameter (it is also aliased as __PARAM5). Here's how I use it in this program to play a set of animation frames:

    ' Use: PLAY_FRAMES Label, FrameCount, FrameTiming, Loops
    ' -- displays animation frames at "Label"
    ' -- "FrameCount" is number of 15-column frames in animation
    ' -- "FrameTiming" is display time for frame in milliseconds
    ' -- "Loops" is number of times to play frames sequence
    
    SUB PLAY_FRAMES
      tmpW2 = __WPARAM12                            ' address of first frame
      tmpB1 = __PARAM3                              ' number of frames
      tmpB2 = __PARAM4                              ' delay between frames
      tmpB3 = __PARAM5                              ' animation loops
    
      DO WHILE tmpB3 > 0                            ' any loops left?
        tmpW3 = tmpW2                               ' point to first frame
        tmpB4 = tmpB1                               ' copy frame count
        DO WHILE tmpB4 > 0
          FOR tmpB5 = 0 TO 14                       ' grab a frame
            READINC tmpW3, dispBuf(tmpB5)           ' move frame to display
          NEXT
          DELAY_MS tmpB2                            ' hold
          DEC tmpB4                                 ' move to next frame
        LOOP
        DEC tmpB3                                   ' update loop count
      LOOP
    
      ENDSUB
    

    Post Edited (JonnyMac) : 7/1/2007 7:23:29 PM GMT
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-07-01 19:27
    JonnyMac,

    All I can say is WOW and Incredible!

    Great job!

    Now it's time to examine it closer to adapt it to my other project (if possible).
Sign In or Register to comment.