a place for robotic enthusiasts, builders and user groups

#include
LiquidCrystal lcd( 10, 11, 12, 13, 14, 15, 16 );
int buttonPin = 8;
int val = 0;
void setup()
{
Serial.begin( 9600 );
lcd.begin( 16, 2 );
lcd.clear();
pinMode( buttonPin, INPUT );
}
void loop()
{
lcd.setCursor( 0, 0 );
val = digitalRead( buttonPin );
if( val == HIGH ) lcd.println( "button pressed " );
else if( val == LOW ) lcd.println( "nothing pressed " );
else lcd.println( "unknown state" );
lcd.println( val );
delay( 1000 );
lcd.clear();
}
Peter Farkas posted a video
Peter Farkas posted a blog post© 2012 Created by Danny.
| Add Videos | Add Photos | Post a Blog | Add Events | Discuss | Form a Group | ||
Sign Up Invite |