Getting a Lua program onto the NXT 1
In my last post, only yesterday, we’ve seen how to install pbLua onto the LEGO NXT. Now we also want it to do something ofcourse.
Let’s first start with connecting to the pbLua-NXT again (using screen – or a utility if you like) and at the > prompt copy and paste the whole following code:
-- Replace HelloWorld on the next line, with the name of the program you want fileName = "HelloWorld" -- Replace the text between [[ and ]] with your own program. programText = [[ nxt.DisplayClear() nxt.DisplayText( "Hello, World!" ) ]] h = nxt.FileCreate( fileName, string.len(programText) ) nxt.FileWrite( h, programText ) nxt.FileClose( h )
This now created a file called HelloWorld onto your NXT. To now also run the program give the following command: nxt.dofile('HelloWorld')
That’s all there is to it, isn’t it easy?
Remember that this procedure is not needed if you just want try the API, remember (if you checked yesterday’s article) that we did nxt.SoundTone() on the console.



If you wanna buy some other things which are not listed in our website: runescape items runescape gold runescape powerleveling runescape power leveling runescape quests runescape accounts runescape powerleveling runescape power leveling runescape gold runescape items runescape money runescape quests runescape accounts runescape power leveling runescape powerleveling runescape gold runescape items runescape money runescape accounts cheap runescape gold cheap runescape money dofus jor dofus gold dofus items dofus guide dofus kamas dofus armes wow lvl wow gold wow items wow guide wow quests wow money wow accounts wow powerleveling wow power leveling please contact with our customer service with on-line chat or add our Email,we will stock it for you in a short time after you told us what you needed.