ROBOTC.net forums
http://robotc.net/forums/

Lego Brick Name
http://robotc.net/forums/viewtopic.php?f=1&t=6397
Page 1 of 1

Author:  Guillaume17 [ Sun Jul 28, 2013 11:21 am ]
Post subject:  Lego Brick Name

Hello to all

I want to know if it is possible to change the name of the brick in RobotC using a code. And also it is possible to retrieve the name of the brick and display it on the screen.

thank you

Author:  Guillaume17 [ Tue Jul 30, 2013 7:24 am ]
Post subject:  Re: Lego Brick Name

Is it possible to change the name and display it with RobotC ?
I need an answer for my project furtur.

Author:  Ernest3.14 [ Tue Jul 30, 2013 3:40 pm ]
Post subject:  Re: Lego Brick Name

As far as I know, you cannot change the name of the brick with your code. There is a `kSizeOfBrickName` variable, but that is a constant 9 (8+1 termination character). And since you can't change the name of your brick while running a program, you might as well store it in a string and use it later. Is there something you are trying to do that necessitates this? If you explain your project, we might be able to help you.

Author:  NeXT-Generation [ Tue Jul 30, 2013 3:44 pm ]
Post subject:  Re: Lego Brick Name

The functions you are looking for are:

Code:
setFriendlyName(sFriendlyName);
getFriendlyName(sName);

Author:  Ernest3.14 [ Tue Jul 30, 2013 6:08 pm ]
Post subject:  Re: Lego Brick Name

Oops... That was in the Bluetooth section, wasn't it. :/

Author:  NeXT-Generation [ Tue Jul 30, 2013 7:02 pm ]
Post subject:  Re: Lego Brick Name

Yep. :P

Author:  mightor [ Wed Jul 31, 2013 1:01 am ]
Post subject:  Re: Lego Brick Name

The name of the brick is not kept on the brick itself. It's stored in the Bluecore chip and retrieved by the firmware. That's how it is able to persist between firmware upgrades and even when switching from the standard LEGO firmware to the ROBOTC one.

= Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/