Shop OBEX P1 Docs P2 Docs Learn Events
How Bean and JonnyMac Saved Christmas — Parallax Forums

How Bean and JonnyMac Saved Christmas

ackericackeric Posts: 7
edited 2008-12-01 02:57 in General Discussion
I work in the "animation" department of the company that does the holiday window for Macy ,Sak"s and Lord&Taylor here in NYC. While we have about many departments working to build thees window the animation department is responsible for anything that moves needs to welded or light up. Traditionally every thing was built with a complex series custom levers pulleys chains, And time delay relays. As the customers demand more and more advance technology. They had·a few near disasters, so the decided to hire a electronics guy. Some how I convinced themI ·had the skills or·at least work cheap.·My back ground leans much more to RF stuff and not MCUs and such. They were already using·BS1/2s and EFX-TECH products. I had a passing knowledge with then and suited 90% of·our needs perfectly. This year we had Had a few complicated requests . I decided we would have to use PCs or sx chips. They went with the sx chips. I may have gotten in over my head. But all is well I had the Parallax forums·. While I did ask A few silly direct questions which were answered swiftly, I learned most everything I needed to now·by going the what seems to be ever post . It turned out every time I did·know·something Bean and/or JonnyMac did· and had written a post with all the info· I needed.

In sort Thanks everyone·.


PS. I ran into an interesting "Bug" for lack of a better term in the sx/b compiler . I need a loop the would run about 25000 times. Like the tired newbie I was I used a byte variable instead of word·. The damn thing work for a long time·so I did not·catch it until I changed a Line of code else were in the program·and it stopped working . I·was some swearing for awhile until I figured that out.

The Windows:
http://www.youtube.com/watch?v=oxCGbjhANLU

http://www.youtube.com/watch?v=Qrq-j0oz2Rs

Comments

  • BeanBean Posts: 8,129
    edited 2008-12-01 02:39
    I assume you were using a FOR...NEXT loop when you tried to go to 25000 ?
    I'll look into the problem.

    Thanks for the accolades (sp).

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    "The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
    www.iElectronicDesigns.com

    ·
  • ackericackeric Posts: 7
    edited 2008-12-01 02:45
    It was a INC· with a If THEN inside a DO While.



    DO While LmtGantry = false
    · inc lmttime
    · if lmttime >25000· then
    · lmttime = 0
    · resethall
    · endif
    · pause 1
    ·LOOP


    It is a hack but i gets the job done
  • JonnyMacJonnyMac Posts: 9,214
    edited 2008-12-01 02:57
    Is the purpose of this code to reset the hall every 25 seconds? Another approach is to create a timer in your ISR that you can monitor and deal with in your main loop. It's a bit of work, but not hard, and can make coding a bit easier in some cases.

    BTW, thanks for the nice shout-out. I'm doing lots of Christmas-oriented stuff with the SX.

    [noparse][[/noparse]Edit] If you ran the code above with lmttime defined as a Byte you should have noticed a compiler warning that a literal (25000) is being truncated to 8 bits (168) -- did you not get this?

    Post Edited (JonnyMac) : 12/1/2008 3:17:59 AM GMT
Sign In or Register to comment.