- 3
- 0
- 约9.92千字
- 约 46页
- 2017-06-11 发布于北京
- 举报
* * * * 建立NXT的Java运行环境 NXT刷固件,将NXJ固件使用leJOS的Flash工具写入到NXT中 如果刷机失败,可以从LEGO官网中找到固件刷回,NXT不会变砖 环境变量 NXJ_HOME LEJOS_NXT_JAVA_HOME PATH=%NXJ%\bin;%PATH% 写入leJOS到LEGO NXT 选择IDE,连接你的NXT 安装新软件 lejos - /tools/eclipse/plugin/nxj/ 以Eclipse为例 第一个程序 与新建类的方式相同 屏幕输出的两种方式 LCD类 System.out.println Hello,World 编译和上传程序 运行-LeJOS NXT Program 插件完成Link、上传和运行的工作 Eclipse方式 编译和上传程序 nxjc.bat,使用javac编译源码,生成class文件 nxjc HelloWorld.java nxjlink.bat,生成LE格式的nxj文件 nxjlink –o HelloWorld.nxj HelloWorld nxjupload.bat,上传nxj文件到NXT,执行程序 (–r参数) nxjupload –r HelloWorld.nxj nxj.bat,集成link和上传功能 nxj –r –o HelloWorld.nxj HelloWorld 手工方式 按键 名称 说明 回车/开机 菜单选择 左 右 退出/关机 当位于顶层菜单时,关机 leJOS的按键 leJOS的菜单 控制轮式小车 To fill a shape with an image. Use existing picture box, DO NOT delete and create new picture box. Right click on the shape. At the bottom of the submenu select “Format Shape” Select “Fill” at the top of the “Format Shape” dialog box. Select “Picture or Texture fill” from the options. And select “File” under the “Insert from” option. Navigate to the file you want to use and select “Insert” On the “Format” tab, in the Size group, click on “Crop to Fill” in the Crop tool and drag the image bounding box to the desired size DELETE THIS INSTRUCTION NOTE WHEN NOT IN USE 控制伺服电机 Motor类是对NXT马达的抽象 马达需要连接A/D端口 A端口 B端口 C端口 Motor类 类 方法 说明 Motor.A forward() 向前转动 backward() 向后转动 stop() 快速停止 getTachoCount() 返回马达角度 setSpeed(int speed) 设置每秒的角度值 rorate(int angle) 旋转angle角度 rorateTo(int angle) 旋转到angle角度 rorate(int angle,boolean immediateReturn) 如果是true,则方法立即返回 rorateTo(int angle,boolean immediateReturn) 如果是true,则方法立即返回 …… 轮式小车 控制两轮驱动的小车高层类,每个轮子都有自己的马达 两个轮子的连接端口 轮子的直径 两个轮子间的距离 DifferentialPilot类 演示—两轮小车运行 To fill a shape with an image. Use existing picture box, DO NOT delete and create new picture box. Right click on the shape. At the bottom of the submenu select “Format Shape” Select “Fill” at the top of the “Format Shape” dialog box. Select “Picture or Texture fill” from the options. And select “File” under the “Insert from”
您可能关注的文档
- 2012年高考病句专题.ppt
- 2012广东高考语音复习(包括真题解析详细).ppt
- 2012水工钢筋混凝土结构-第九章.ppt
- 2012湖南市场钢材需求报告.ppt
- 2012春夏时装周女装流行元素解析.ppt
- 2012版初中英语新课标金榜学案配套课件:Unit3(人教版七年级下).ppt
- 2012自由主义new.ppt
- 2012雷神公司介绍(中文).ppt
- 2012高考英语语法:名词性从句(共53张PPT).ppt
- 2012高考一轮复习语文成语2.ppt
- 《JBT 11734-2013石膏型熔模铸造用铸型粉》专题研究报告.pptx
- 《JBT 9478.11-2013光电池测量方法 第11部分:结电容》专题研究报告.pptx
- 《JB 5857-1991信号继电器试验程序和试验方法》专题研究报告.pptx
- 《JBT 5305-2006滚动轴承 带调心座垫圈的推力球轴承 公差》专题研究报告.pptx
- 《JBT 5742.2-2014单排多轴木工钻床 第2部分:精度》专题研究报告.pptx
- 《JBT 11772-2014机床 回转油缸》专题研究报告.pptx
- 《JBT 11848-2014空气分离设备用离心式氧气压缩机》专题研究报告.pptx
- 《JBT 12016-2014光电式电接点压力表》专题研究报告.pptx
- 《JBT 12050-2014机械压力机用凸轮控制器》专题研究报告.pptx
- 《JBT 13210-2017印刷机械 瓦楞纸板上料机》专题研究报告.pptx
原创力文档

文档评论(0)