Lua on LEGO Mindstorm NXT 2
Wow! It’s been a long time since I wrote here, but in the mean time cool things have happened. Firstly there’s pbLua, secondly I bought myself a Lua book.
So, how now do you go about to install pbLua on your NXT? If you’re using Windows, there’s not really an issue, because that’s all explained on the homepage. I’m using a Mac, so here it is.
Setup
1) First download pbLua, I’ve got a ‘nxt-lua-beta-15b’ folder on my Desktop.
2) Start up LEGO’s MINDSTORMS NXT
3) Use the Tools menu and use the “Update NXT Firmware…” option, click “Browse” and navigate using the browser to the folder ‘nxt-lua-beta-15b’ on your Desktop. The window should show “nxt-lua” as “Available Firmware Files”.
4) Now connect your NXT, click “Download” and wait ….
5) If everything is correct, your NXT screen should show “pbLua Beta 15b”, the 15b depends on the version you downloaded.
Okay now what?
Now you’ve got a Lua-enabled NXT, but it’s not very clear how to continue further. Luckily it says somewhere on the homepage that there’s a USB Console as well as a BT (BlueTooth) Console. Let’s start with the USB Console.
1) Fire up Terminal.app
2) Do an ls /dev/tty.usb*, in my case this shows a /dev/tty.usbmodem1a21, but your results may vary.
screen /dev/tty.usbmodem1a21, this should refresh your screen and show you:
pbLua Beta 15b >
You’re now in a Lua interpreter, type print("Hello World!"), just for the kicks of it!
Basically you can now use the pbLua API, to do anything you want, try nxt.SoundTone() for example, woohoo isn’t that great?!
4) To quit the Console type Ctrl-a Ctrl-\.
Enabling Bluetooth
1) Basically you go about as you would connect any other Bluetooth device to your Mac, just select “Any Device”, find the NXT in the list of Devices and have the “Use a specific passkey” option selected for the Passkey Options.
2) During “Gathering information about your device” and while it’s connecting, Mac OSX will ask you for a passkey, think of something, then go to your USB console and use the Lua function nxt.BtSetPIN('something') (on your USB console) to confirm the bluetooth-passkey from your NXT end.
At some point Mac OSX will say “Connected”. Remember the device name!
Bluetooth Console
1) Reboot your NXT (by holding the grey button for some time) and start it again by clicking the orange button. Then you should see something like:
USB Console BT Console . . . . . . 00000 Button:0
Then use the dark grey button, to highlight BT Console, next use the arrow buttons to find the device name of your computer (which in my case is ‘galactica’).
USB Console BT Console . . galactica AD:000000000000 CL:000000 ST:00 Idx: 00 00000 Button:0
Once you’ve got this selected, the screen should show:
Wait for connect Active: 00 Update: 0 . . . . . .
2) Fire up Terminal.app
3) Do an ls /dev/cu.<bluetooth-device-name>*, in my case my NXT is called “r2d2” (yup!). So I did a ls /dev/cu.r2d2*, this shows a /dev/cu.r2d2-DevB-1, but your results may vary, depending on your device name.
screen /dev/cu.r2d2-DevB-1 (or whatever you found at step 2), this should refresh your screen and show you:
pbLua Beta 15b >
Woohoo, wireless pbLua!!
More to follow, later, keep you posted – check back!



If you wanna buy some other things which are not listed in our website: runescape items runescape items runescape gold runescape money runescape money runescape accounts runescape accounts runescape accounts runescape accounts dofus items dofus kamas dofus jor dofus armes dofus guide runescape power leveling runescape powerleveling runescape money runescape quests runescape powerleveling runescape power leveling runescape powerleveling runescape power leveling runescape gold runescape quests dofus gold runescape items runescape gold runescape accounts cheap runescape gold cheap runescape money wow lvl wow gold wow money wow powerleveling wow power leveling wow items wow accounts wow quests wow guide 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.
world of warcraft power leveling wow power leveling power leveling runescape gold rs2 gold wow gold 中国福利彩票 直流电源 电磁阀 福彩3d 枕式包装机 纸巾机 汽车水箱 汽车散热器 汽车暖风 oil painting
吹膜机 汽车减震器 shock absorber 环保空调 金属探测门 runescape money rs2 money dofus kamas thermoforming Equipment 印刷机械 bag making machine 工业设计 锻件 液压机 涂布机 分切机 粉末冶金 plastic machine packing machine
power leveling wow power leveling 香炉 Thermoforming Machine 包装机械 液压机 铝型材 活塞 激光礼品 鞋业 环保空调 吹膜机 汽摩塑料配件 塑料酒瓶包装 塑料件喷漆 google排名
tungsten carbide tungsten plate tungsten electrode tungsten wire tungsten alloy tungsten rod tungsten product molybdenum sheet molybdenum product molybdenum wire molybdenum rod thermoforming machine thermoforming Equipment Plastic Machinery Plastic Thermoforming Machine Plastic Thermoforming Machinery Plastic Sheet Unit,Plastic Extruding Machine Plastic Machine prada shoes true religion jeans evisu jeans Ed hardy Gucci shoes Gucci Handbag adidas shoes Ugg Boots nike shoes LV handbags Jordan shoes new era caps
包装带设备 模切机 压痕机 切纸机 压纹机 上光机,过油上光机,开槽机,V槽机,折盒机 开槽机 V槽机 折盒机 覆膜机 覆面机 气动马达 气动搅拌机制袋机 手套机 收卷机 吹膜机 连线机 粉碎机 脱水机 搅拌机 造粒机 团粒机 卷绕机 拉丝机 织带机 包覆丝机 圆织机 裁料机 冲口机 下料机 压合机 纸杯机 纸碗机 纸碟机 热成型机 片材机 制杯机 牵引机 压底机 挤出机 冲压机 包装机 贴窗机 涂胶机 信封机 捆扎机 打包机 切袋机 喷码机 刻字机 打标机 标示机 缠绕机 灌装机 封箱机 丝印机 封口机 裹包机 整理机 滚齿机 封面机 包边机 折入机 整平机 冷压机 镂铣机 贴角机 贴膜机 纸巾机 湿巾机 折叠机 充填机 抛光机 装盒机 调头机 折边机 修边机 上光机 压光机 压纹机 压花机 分切机 分条机 涂布机 覆面机 裱纸机 除粉机 糊盒机 打孔机 磨刀机 切割机 钻孔机 胶水机 圆角机 压平机 划线机 纠编机 插边机 淋膜机 切片机 开槽机,V槽机 底封机 上糊机 制袋机