ASCII

Discussion specific to projects ideas and support.
Post Reply
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

ASCII

Post by dudmaster »

Hello, i need a complete ASCII table of the NXT, because i have use of the check mark (used in NXT Program menu)
and i don't have the character to copy into my program. Does anyone have a copy-paste ASCII NXT table that has the check-mark?

Thanks,
DUD
2Labz.com, My Website
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: ASCII

Post by mattallen37 »

If all you want, is a check mark, you could just draw it with two lines, although I would as well like to see a list of NXT supported characters.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: ASCII

Post by muntoo »

mattallen37 wrote:If all you want, is a check mark, you could just draw it with two lines, although I would as well like to see a list of NXT supported characters.
All you need to do is test them out. The values supported, AFAIK, are from 0x20 to 0x7F inclusive (32 to 127).

Here is my favourite ASCII table look up website*:
http://ascii-table.com/

* ...so far. You may start finding other good ASCII websites, and have to give up your old ones. No matter how long you've spent time together, you have to stop crying, and let it go. It's for the better for both of you.
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

Re: ASCII

Post by dudmaster »

I'v been testing them out for some time using my TextEdit program. I accidentally found this character in a .txt file that i read by using my TextEdit program.
2Labz.com, My Website
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: ASCII

Post by afanofosc »

This is the default NXT font:
Font.JPG
Font.JPG (3.44 KiB) Viewed 6960 times
The last character in this font looks a bit like a checkmark. Its ASCII value is 0x7F or 127.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

Re: ASCII

Post by dudmaster »

How can i initialize this character to an array and/or variable?

Can you post a program?

Thanks, Dud.
2Labz.com, My Website
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: ASCII

Post by muntoo »

dudmaster wrote:How can i initialize this character to an array and/or variable?

Can you post a program?

Thanks, Dud.
I'll assume you're talking about this:

Code: Select all

void WasteSomeRAMandCPU(string &szOut[])
{
    ArrayInit(szOut, " ", 0x80-0x20+1);
    for(char charidx = 0x20; charidx < 0x80; charidx++)
    {
        szOut[charidx-0x20] = FlattenVar(charidx);
    }
}


string UseThisInstead(unsigned int idx)
{
    idx += 0x20;
    return(FlattenVar(idx));
}

task main()
{
    string szVar[];
    WasteSomeRAMandCPU(szVar);
    TextOut(0, LCD_LINE1, szVar[10], 0);
    TextOut(0, LCD_LINE2, UseThisInstead(10), 0);
    Wait(2000);
}
If I assume incorrectly, please correct me.
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests