|
Just got my handyboard, and I am new to programming, so I have a
probably simple question for you all. I have been playing around with
IC trying to get responses on the LCD from start button presses. if I
send the following on the IC command line :
{if (start_button()) printf("you pressed the start button\n");}
It will work only if I am holding the start button when I press return
and it sends the code to the HB. What I want to know is how do I get it
to react to a button press. What I was hoping for was to send the code
then have the HB wait for me to press the button to execute the printf.
Thanks,
Todd
|
|
Message has 1 Reply: | | Re: IC question
|
| You might try something like: while( 1 ) { if( start_button() ) printf( "you pressed the start button\n" ); else printf( "\n" ); msleep( 250L ); } or simply: { start_press(); printf( "you pressed the start button\n" ); } -- Will (...) +---...---+ | (...) (25 years ago, 27-May-00, to lugnet.robotics.handyboard)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|