To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 7861
7860  |  7862
Subject: 
IC question
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sat, 27 May 2000 01:17:58 GMT
Viewed: 
951 times
  
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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR