Shop OBEX P1 Docs P2 Docs Learn Events
I messed up. - Page 2 — Parallax Forums

I messed up.

2»

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-03 23:09
    Tony,

    ·· I just realized I didn't explain the DATA statements, and to many they won't be self-explanatory.· The way it works is that the high bit (BIT15) is the on/off state of the LED, and the other 15 bits are the counter which determines how long that LED is in that state.· Sorry for any confusion.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-07 15:22
    Tony/Paul,

    ·· If you guys are having trouble following the code, let me know.· I wasn't sure if you'd understand what I was doing in that code.· But I believe it does what Tony was looking for?· Correct me if I am wrong so I may alter the program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-09-07 16:07
    I briefly looked at the code, but haven't had much opportunity to examine it closely, (See "Goodbye for a month or so" post in sandbox), Im presently on lunch break which explains my brief presence here at the moment. I will look more closely when time permits, the basic structure appears to be correct, though there may be room for compacting the code (at the expense of readability), but I would have to examine it more closely to know for sure.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-07 16:51
    Paul,
    Paul Baker said...(trimmed)
    the basic structure appears to be correct, though there may be room for compacting the code (at the expense of readability)

    This is why I didn't post it when I first mentioned it.· Then I got to thinking when you mentioned that I didn't post it that maybe some people would think it wouldn't work.· So I expanded it really quick and posted it.· It's actually more than double what I had when I mentioned the concept the first time.· The difference here is this program was written in like 10 minutes.· So yeah, it could be compacted.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.