|
|||||||
![]() |
Forum Index > Projects > Micro-readerboard project support | ||
alphanumeric led display with arduino? |
|||
| | | Printable Version |
|
Leviathan34 | ||||||||
|
Can somebody please give me some advice or something? I really need help here! |
![]() Henchperson ![]() Status: offline
Registered: 11/15/09 |
||||||||
|
|||||||||
|
Windell | ||||||||
|
Last I heard, you didn't need serial or ICSP in your project, so you just needed to hook up the appropriate digital I/O lines with some resistors and transistors, and you had figured out how to do it... except that maybe you decided to change your mind and try some irrelevant things (like analogWrite). I'm not sure what you're asking. Shouldn't you go back and do it digitally, as you had already intended to? Windell H. Oskay drwho(at)evilmadscientist.com http://www.evilmadscientist.com/ |
![]() Evil Scientist ![]() Status: offline
Registered: 06/15/06 |
||||||||
|
|||||||||
|
Leviathan34 | ||||||||
|
Alright, this time I've figured it out for real. It turns out that you can use the analog pins as general I/O pins. |
![]() Henchperson ![]() Status: offline
Registered: 11/15/09 |
||||||||
|
|||||||||
|
Leviathan34 | ||||||||
|
Okay so I figured out how I'm going to do it but I've hit a snag with the programming............it doesn't work right. |
![]() Henchperson ![]() Status: offline
Registered: 11/15/09 |
||||||||
|
|||||||||
|
Leviathan34 | ||||||||
|
Hey, sorry for that grossly huge post. PHP Formatted Code void clock() {currentMillis = millis(); if (currentMillis < previousMillis) // if millis overflows { m += MAX_MILLIS_VALUE - previousMillis + currentMillis; } else // if millis has not overflown { m += currentMillis - previousMillis; }currentMillis = millis(); if (m > 999) { seconds++; m = m - 1000; } if (seconds > 59) { ones++; seconds = 0; } if (ones > 15) { tens++; ones = 0; } if (tens > 3) { hours++; tens = 0; } if (hours > 12) { hours = 1; } } |
![]() Henchperson ![]() Status: offline
Registered: 11/15/09 |
||||||||
|
|||||||||
|
Windell | ||||||||
|
I might suggest that you only want to call millis() ONCE in your loop, to avoid possible error buildup. Also, are you actually setting previousMillis anywhere? Windell H. Oskay drwho(at)evilmadscientist.com http://www.evilmadscientist.com/ |
![]() Evil Scientist ![]() Status: offline
Registered: 06/15/06 |
||||||||
|
|||||||||
|
Leviathan34 | ||||||||
|
Oh yeah, woops. I did forget to set previousMillis. That weird cause I swear I had that in there. |
![]() Henchperson ![]() Status: offline
Registered: 11/15/09 |
||||||||
|
|||||||||
|
|
| All times are PDT. The time is now 05:28 PM. |
|
|
Octolively
Interactive LED kits
Meggy Jr RGB
LED matrix game
development kit.
Business-card sized
AVR target boards
Peggy 2
LED Pegboard kits