NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Project Help and Ideas » Maquee scrolling working
November 22, 2009 by Rick_S |
Well I finally got my marquee to scroll. May be simple for some but it was an achievement for me! :) I made a quick video in case anyone is interested. Rick |
---|---|
November 23, 2009 by Farmerjoecoledge |
Hey Rick that's pretty good, i'll trade you a "pipe" (python script| tr a-z A-Z | nc localhost 6667) for your code. This will run an entire web page. If you could post your code,that would be great, i'm still out in the left field, you see. farmerjoe |
November 23, 2009 by Rick_S |
Most of what I did was simply using what was already there. Namely the "font_display(char,offset)" function. That went pretty easy. You can see their example in the "do_testpattern()" function where they spell out "HELLO" one letter at a time. The sparkle effect was done by modifying the ledarray_testpattern() function as shown below.
} The hardest part for me (and it's still not quite there) was getting a word larger than would fit on the display to scroll off. I did this by creating a new function called "scroll_display(*char)". This function was done by copying and modifying their serial scrolling function "do_scrolling_display". The function works except for scrolling off the screen. To get that to work, I pad my string I send it with trailing spaces. This works for now but I want to did deeper and "fix" that. Here's the code if you want it though.
Sorry it's not commented. I have to go through it and do that. Bad habit of mine to just keep changing a little here and there without comments until I get something working. To call the function, I would just do:
and that will scroll that phrase across the screen. Hope it works for you. Rick |
November 23, 2009 by n3ueaEMTP |
Cool!! My LEDs should be here tomorrow, hopefully I can get mine working without a hitch. |
November 23, 2009 by Farmerjoecoledge |
Excellent! as soon as my new programmer gets here she'll be sparkling, thx |
November 23, 2009 by Rick_S |
No problem. We're all here to learn. Trust me, I'm far from being anything but a novice when it comes to C. |
November 24, 2009 by Rick_S |
If anyone is still following this thread, I have posted a newer version of the scroll_display function in the Micro-controller programming section of the forum. I have commented the source as well as "fixed" the function so the trailing spaces are no longer needed in the strings passed to it. Rick |
Please log in to post a reply.
Did you know that NerdKits make a great parent/child activity? Learn more...
|