View unanswered posts | View active topics It is currently Sat Aug 23, 2014 7:28 am






Reply to topic  [ 2 posts ] 
Robot C display 
Author Message
Rookie

Joined: Mon Nov 26, 2012 9:47 am
Posts: 1
Post Robot C display
I have a problem with the displaying values on the Robot C display. How can you display the threshold value for the light sensor on the display? How do you display a timer on the NXT. Thank you.


Tue Nov 27, 2012 9:48 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 565
Post Re: Robot C display
I would suggest taking a look at our NXT Functions Display page on our wiki (http://www.robotc.net/wiki/NXT_Functions_Display) as it covers all of the NXT Display Functions. The simplest way to display a sensor value is by using the nxtDisplayTextLine(nLineNumber, pChar, ...); command:

Code:
nxtDisplayTextLine(0, "touch1 value: %d", SensorValue[touch1]);


This will display the text "touch1 value: " and then the value of the touch1 sensor (in decimal values) on the first line of the NXT display. One thing to note, however, is that any given line of the NXT display has a 19 character limit, so you will want to take that into consideration when printing lines to the NXT.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Tue Nov 27, 2012 11:09 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.