Subject:
|
Re: Scrolling through the LCD messages by the knob
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Fri, 15 Jan 1999 21:36:09 GMT
|
Original-From:
|
Curt Mills, WE7U <hacker@tc%Spamless%.fluke.com>
|
Viewed:
|
1006 times
|
| |
| |
On Fri, 15 Jan 1999, Gustav Schulz wrote:
> i am looking for a program to use the knob for scrolling through
> messages.
> anyone already written such a program ?
Yes, and it is totally trivial to do so. I don't have my sources here at
the moment, but it is roughly like this:
c = readknob(); /* or whatever the cmd is for reading it */
if ( c < 64 )
{
print "a";
}
else if ( c < 128 )
{
print "b";
}
else if ( c < 192 )
{
print "c";
}
else
{
print "d";
}
or set a variable inside each if block and then run through a switch
statement later when you're doing your printing.
Sorry if my C is rusty. I do too many languages nowadays...
Curt Mills, WE7U hacker.NO_*SPAM@tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
|
|
Message has 1 Reply:
Message is in Reply To:
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|