We've bought a lego mindstorm kit fto use at our school.Now I'm playing around with the RobotC program to let the robot move.

But if I adjust my code and download it to the NTX again, it will still use the 'old' code which I put there before.

This looks like a cache problem? Can somebody help me?

Thanks,Arnold.

Tue Nov 27, 2012 8:49 pm

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1512

Re: Cache problem ?

Tell us what exactly you did so we can figure out what went wrong. If you select Robot->Compile and Download, your new code should be downloaded to the robot. How did you "run" this code? Did you use the joystick dialog? If so, did you click teleop start? NXT allows you to download multiple programs to the brick. If the two programs are with different names, both of them can exist on the brick at the same time. If you are running with the joystick dialog, you need to make sure you have picked the correct teleop program from the dialog.

Then using the Robot > Compile and download, the file will be pout on the ntx.

However if I then adjust te code, lets say change the speed to 100, and then Robot > compile and upload, the nTX will still uses the old code!

Tue Nov 27, 2012 9:07 pm

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1512

Re: Cache problem ?

How did you "start" the program?

Tue Nov 27, 2012 9:13 pm

arnolddejong

Rookie

Joined: Tue Nov 27, 2012 8:44 pmPosts: 9

Re: Cache problem ?

On my NTX I go to My Files > Software files > name of the file > run

Tue Nov 27, 2012 9:14 pm

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1512

Re: Cache problem ?

Also pay attention to the tab. When a source file is changed, there is a "*" next to the file name. That means the file has not been "saved" to the disk yet. Usually by clicking "Compile and Download", it will automatically save the file before compiling the code. And make sure you indeed clicked "Compile and Download", not just "Compile".

Tue Nov 27, 2012 9:17 pm

arnolddejong

Rookie

Joined: Tue Nov 27, 2012 8:44 pmPosts: 9

Re: Cache problem ?

I'm sure I've saved the file. Then indeed Robot > compile and download.But still my NTX will use the old code I've put there before.I've also tried to delete the file on the NTX, and then compile and download again, buit still the NTX will use the old code.

See the attachment for a short swf movie, how I adjust, save and download the code.

On the NXT, delete the original file and do a compile and download again and see if that will download the new one.

Tue Nov 27, 2012 9:43 pm

arnolddejong

Rookie

Joined: Tue Nov 27, 2012 8:44 pmPosts: 9

Re: Cache problem ?

Nope, sorry.

When I delete the file, and then turn off the NTX, then wait a while, turn the NTX on, download the new file, then it wil lwork. (sometimes)because I saw the text appear in the display.But when I adjust the code and the number for the text, compile and download, it will still show the old text ! :=(

Tue Nov 27, 2012 9:49 pm

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1512

Re: Cache problem ?

What version of RobotC are you using? From you flash video, it looks old.

Tue Nov 27, 2012 9:53 pm

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1512

Re: Cache problem ?

Are you sure the download was successful? Are you using a USB cable connecting to the NXT?

Tue Nov 27, 2012 9:55 pm

arnolddejong

Rookie

Joined: Tue Nov 27, 2012 8:44 pmPosts: 9

Re: Cache problem ?

ROBOTC 2.01 indeed from dec 8 2009 (sounds old)This was e version on the CD which was inckluded in the mindstorm package.

Who is online

Users browsing this forum: No registered users and 2 guests

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