View unanswered posts | View active topics It is currently Fri Oct 19, 2018 6:43 pm

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
VEX LCD Buttons
Author Message
Rookie

Joined: Wed Sep 07, 2011 4:20 pm
Posts: 5
VEX LCD Buttons
What is the code for the lcd buttons with ROBOTC 3.0?

Wed Sep 07, 2011 4:22 pm

Joined: Mon Jun 08, 2009 4:50 pm
Posts: 70
Re: VEX LCD Buttons
Hi cloud202,

It's very simple, just use this code:

 Code:if(nLCDButtons == button){  // do something}

"button" is where you would put an integer that corresponds to the buttons on the VEX LCD. The buttons are:
Left = 1
Center = 2
Right = 4.

Knowing this, you can then check for combinations of buttons being pressed by summing their value. So if you wrote,
 Code:if(nLCDButtons == 6){  // do something}

you would be checking to see if BOTH the CENTER and RIGHT buttons were pressed, since 2+4 = 6.

So the full table of buttons would be:

LEFT = 1
CENTER = 2
left&center = 3
RIGHT = 4
left&right = 5
center&right = 6
ALL = 7

Hope that helps!

_________________
Bence Feher

ROBOTC - Testing/Documentation/Developer

Computer Science, Japanese, East Asian Studies
University of Pittsburgh, Konan University 甲南大学

Fri Sep 09, 2011 10:30 am
Rookie

Joined: Wed Sep 07, 2011 4:20 pm
Posts: 5
Re: VEX LCD Buttons
Thank you. That helps alot.

Fri Sep 09, 2011 3:45 pm
Display posts from previous:  Sort by
 Page 1 of 1 [ 3 posts ]

#### Who is online

Users browsing this forum: No registered users and 2 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning