NXT display help

Discussion specific to projects ideas and support.
Post Reply
mjohnso9
Posts: 2
Joined: 10 Apr 2012, 20:33

NXT display help

Post by mjohnso9 »

Hello.
This is my first post and I am glad to be apart of this forum. I am fairly new to RobotC but I have many ideas that I want to try out.
My question is how do you write the proper codes to display on the nxt lcd. Also how do you pin point spots on the lcd to display text. I am under the impression that it is based upon a grid. An example of what I am speaking on is if I wanted to display a 2 in the center of the screen, a 3 on the top row, or a 5 in the bottom left corner. If anyone has any programming examples that would be a great help.
inxt-generation
Posts: 290
Joined: 03 Oct 2011, 00:06
Location: Gallifrey
Contact:

Re: NXT display help

Post by inxt-generation »

Welcome to the MiBo (MindBoards) forums, mjohnso9! (Is the "9" supposed to be a "n"? Any relation to Cave Johnson? 8-) :lol: )There are many, many, MANY different screen commands in RobotC. You would probably want to check out the "help" section in the software for a complete list. What you've listed here are some of the most basic commands. It is based upon a 100x64 grid, starting with 0,0 the bottom left corner, and ending at 99,63 on the top right. The following code will print the numbers you mentioned, and 4 dots at random locations on-screen.

Code: Select all

task main()
{
  nxtDisplayCenteredTextLine(3, "2");
  nxtDisplayTextLine(0, "           3");
  nxtDisplayTextLine(7, "5");
  nxtSetPixel(random[100], random[64]);
  nxtSetPixel(random[100], random[64]);
  nxtSetPixel(random[100], random[64]);
  nxtSetPixel(random[100], random[64]);
}
Does this help at all?

P.S. You might want to give the RobotC forums a try for support specific to RobotC. There aren't many RobotC users here.
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
mjohnso9
Posts: 2
Joined: 10 Apr 2012, 20:33

Re: NXT display help

Post by mjohnso9 »

Thank you so much I believe I have some further understanding with what you have sent me. Also thanks for referring me to the robotc forum. I am new to forums.
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests