打字机实验报告Word文档格式.docx
《打字机实验报告Word文档格式.docx》由会员分享,可在线阅读,更多相关《打字机实验报告Word文档格式.docx(10页珍藏版)》请在冰豆网上搜索。
反之,当一个小齿轮带动一个大齿轮,称为“减速”。
对于扭矩T和角速度ω之间的关系也可以用等式来表示。
扭矩T,角速度,ω,相互啮合二齿轮之间的扭矩和角速度可用下面的等式表示:
T1ω1=T2ω2
在Lego机器人机构中常常使用齿轮系来增大力矩,比如增大力矩使其可以爬过斜坡。
四、实验目的:
1、综合legao的一些基本知识,基本结构搭建打字机结构
2、使用java编程实现打字
五、实验内容
1.使用LEGO结构的拼建打字机
1)基本零件的使用:
如销、梁等
2)平行结构的拼建
3)坚固的底座或者结构如何实现
4)齿轮等机构的设计
2.使用java编程,通用型打字机可以打出任何字
六、实验器材
Lego机器人配件,pc,LDD软件
七、实验步骤
1、搭建Lego打字机个结构
2、编写java代码实现打字并不断调试
3、根据结果不断改造机械结构
八、实验数据及结果分析:
importlejos.nxt.*;
//节点类
classNode
{
intangle;
Nodenext;
Node(Nodehead)//头节点构造函数
{
next=head;
}
Node(intangle,NodenextNode)//元素节点构造函数
this.angle=angle;
next=nextNode;
publicvoidsetNext(Nodenext)//设节点
this.next=next;
publicintgetAngle()//得角度
returnangle;
}
//单链表类
classLinList//implementsList
Nodehead;
Nodecurrent;
intsize;
LinList()
head=current=newNode(null);
size=0;
publicvoidindex(inti)throwsException//定位
if(i<
-1||i>
size-1)
{
thrownewException("
参数错误3"
);
}
if(i==-1)return;
current=head.next;
intj=0;
while((current!
=null)&
&
j<
i)
current=current.next;
j++;
publicvoidinsert(inti,intj)throwsException//插入元素
if(i<
0||i>
size)
参数错误2"
index(i-1);
current.setNext(newNode(j,current.next));
size++;
publicintgetData(inti)throwsException//取数据元素
参数错误1"
index(i);
returncurrent.getAngle();
//主类
publicclassHelloWorld
{
static//打字数组
inta[][]={
{0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0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,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,3,0,0,0,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,3,0,0,3,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,3,3,3,3,0,0,0,0,0,3,0,0,3,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,3,0,3,3,3,3,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,3,0,0,0,3,0,3,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,3,3,3,3,3,0,3,0,0,0,3,0,3,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,3,0,3,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,3,0,3,0,0,0,0,0,3,0,3,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,3,3,0,3,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0}
};
finalstaticintHANG=a.length;
//行
finalstaticintLIE=a[1].length;
//列
finalstaticintANGLE=10;
//每个点间隔
finalstaticintmark=3;
//字的标志
staticLinListb[]=newLinList[a.length];
//链表数组
staticbooleanbool=true;
//判断标志
publicstaticvoidmain(Stringargs[])throwsException
HelloWorlds=newHelloWorld();