NXT Grayscale Screen?
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXT Grayscale Screen?
Ah, you're right. Thanks for correcting me on that. I have no idea why I though the ATMEGA controlled it.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
-
- Posts: 224
- Joined: 30 Oct 2010, 04:10
- Location: 127.0.0.1
- Contact:
Re: NXT Grayscale Screen?
If all you want to do is change the color of the whole screen you can use SetDisplayContrast() in NXC (This requires EFW 1.28+)
This is the sample program from the NXC Guide
This is the sample program from the NXC Guide
Code: Select all
task main()
{
for (byte contrast = 0; contrast < DISPLAY_CONTRAST_MAX; contrast++)
{
SetDisplayContrast(contrast);
NumOut(0, LCD_LINE1, DisplayContrast(),);
Wait(100);
}
for (byte contrast = DISPLAY_CONTRAST_MAX; contrast > 0; contrast--)
{
SetDisplayContrast(contrast);
NumOut(0, LCD_LINE1, DisplayContrast());
Wait(100);
}
SetDisplayContrast(DISPLAY_CONTRAST_DEFAULT);
NumOut(0, LCD_LINE1, DisplayContrast());
while(true);
}
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXT Grayscale Screen?
They want actual grayscale.timpattinson wrote:If all you want to do is change the color of the whole screen you can use SetDisplayContrast() in NXC (This requires EFW 1.28+)...
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: NXT Grayscale Screen?
Hmm... can you change this at a frequency greater than 10Hz?timpattinson wrote:If all you want to do is change the color of the whole screen you can use SetDisplayContrast() in NXC (This requires EFW 1.28+)...
---
If the viewer is d cm distance away from the NXT, you can try "halftones":
Code: Select all
void GS_RectOut(int x, int y, int width, int height, unsigned long options=DRAW_OPT_NORMAL, int blockSize = 2)
{
for(int _y = y; _y < (y + height + 1); _y++)
{
for(int _x = x; _x < (x + width + 1); _x++)
{
PointOut(_x, _y, ((_x % blockSize) + (_y % blockSize)) % blockSize);
}
}
}
Also, the changing the "options" argument won't really do anything as you would expect it to. I haven't added that functionality for sake of simplicity. I'm not sure if "blockSize" will work as I expect it to if you change it to any value other than 2... (This is just an example; I'm not going to waste brain CPU on this! ...I think Doc had the right idea: do the "hard" stuff, but not the "easy" stuff. )
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
-
- Posts: 224
- Joined: 30 Oct 2010, 04:10
- Location: 127.0.0.1
- Contact:
Re: NXT Grayscale Screen?
Will test this ... stay tunedmuntoo wrote:Hmm... can you change this at a frequency greater than 10Hz?timpattinson wrote:If all you want to do is change the color of the whole screen you can use SetDisplayContrast() in NXC (This requires EFW 1.28+)...
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
-
- Posts: 224
- Joined: 30 Oct 2010, 04:10
- Location: 127.0.0.1
- Contact:
Re: NXT Grayscale Screen?
Have done a test with this code...
It takes 8914ms to change the contrast 32767 times (i used an int as the counter variable , this is the max of the int type)
-Tim
Code: Select all
task main()
{
bool max = false;
unsigned long timer = CurrentTick();
for(int i = 0; i < INT_MAX; i++)
{
if(max)
{
SetDisplayContrast(DISPLAY_CONTRAST_DEFAULT);
}
else
{
SetDisplayContrast(DISPLAY_CONTRAST_MAX);
}
max = !max;
}
TextOut(0,LCD_LINE1,StrCat( NumToStr(CurrentTick() - timer),"ms" ,"/", NumToStr(INT_MAX)));
SetDisplayContrast(DISPLAY_CONTRAST_DEFAULT);
while(1);
}
-Tim
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
Re: NXT Grayscale Screen?
Sure, you can send the command that frequently, but does the LCD screen processor actually do anything with that changed info more than 10 times a second? It would be no different than changing the motor speeds every 1ms in your program when the ATmega only updates it every 3ms.
- Xander
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXT Grayscale Screen?
You were probably just using made up numbers in that motor update speed example, because IIRC, with standard FW, it is every 100ms, not 3ms (for your/others information).
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: NXT Grayscale Screen?
The ARM7 and ATmega chat each 3ms from what I've understood. Perhaps the motor example was not a very good one, but you get what I mean
A better example would be the PELICAN crossing system. Pressing the button repeatedly to make the little man turn green isn't going to make him change any faster. That never seems to stop people, though.
- Xander
A better example would be the PELICAN crossing system. Pressing the button repeatedly to make the little man turn green isn't going to make him change any faster. That never seems to stop people, though.
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: NXT Grayscale Screen?
So waht about using halftone and putting flashing black pixels over it?
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
Who is online
Users browsing this forum: No registered users and 0 guests