NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » LCD sequence question
July 14, 2010 by ZachT |
First I'd like to say I just got my kit and I'm having a blast. I got to the point where I uploaded my first program and I've edited it a bit. I got the third line to blink! It only took me an hour and a half to figure out the code. I suppose no one is an expert over night. Anyway, I have 20 characters to work with. I want a * to start in the middle and then it to fill up all 20 spaces with *** ect and then repeat that. I'm not sure where to begin putting this into code. Can someone point me in the right direction? |
---|---|
July 15, 2010 by hevans (NerdKits Staff) |
Hi Zach, I am glad you are having fun with the NerdKit. Let's see if I can get you going in the right direction with your idea. Take a look at the following code:
If you put this in your main function, the top line will fill in with stars starting from the beginning. I used a simple for loop that writes a single * to the screen every time. Modifying this idea to fill the stars in from the middle will require some thinking. Give it a shot and let us know what you come up with. Humberto |
Please log in to post a reply.
Did you know that spinning a permanent magnet motor makes a voltage? Learn more...
|