1、反之,当一个小齿轮带动一个大齿轮,称为“减速” 。 对于扭矩 T 和角速度 之间的关系也可以用等式来表示。扭矩 T,角速度,相互啮合二齿轮之间的扭矩和角速度可用下面的等式表示:T11=T22在Lego机器人机构中常常使用齿轮系来增大力矩,比如增大力矩使其可以爬过斜坡。四、实验目的:1、综合legao的一些基本知识,基本结构搭建打字机结构2、使用java编程实现打字五、实验内容1.使用LEGO结构的拼建打字机 1)基本零件的使用:如销、梁等 2)平行结构的拼建 3)坚固的底座或者结构如何实现 4)齿轮等机构的设计2.使用java编程,通用型打字机可以打出任何字六、实验器材Lego机器人配件,pc
2、,LDD软件七、实验步骤1、搭建Lego打字机个结构2、编写java代码实现打字并不断调试3、根据结果不断改造机械结构八、实验数据及结果分析:import lejos.nxt.*;/ 节点类class Node int angle ; Node next; Node(Node head) / 头节点构造函数 next = head; Node(int angle, Node nextNode) / 元素节点构造函数 this.angle = angle; next = nextNode; public void setNext(Node next) / 设节点 this.next = next
3、; public int getAngle() / 得角度 return angle;/ 单链表类 class LinList /implements List Node head; Node current; int size; LinList() head = current = new Node(null); size = 0; public void index(int i) throws Exception / 定位 if (i size -1) throw new Exception(参数错误3); if(i = -1) return; current = head.next; i
4、nt j = 0; while(current != null) & j i) current = current.next; j+; public void insert(int i ,int j)throws Exception / 插入元素 if(i size)参数错误2 index(i-1); current.setNext(new Node(j,current.next); size+; public int getData(int i)throws Exception / 取数据元素参数错误1 index(i); return current.getAngle();/主类 publ
5、ic class HelloWorld static / 打字数组 int a = 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,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,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,0,0,3,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,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,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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
10、,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 ; final static int HANG = a.length; / 行 final static int LIE = a1.length; / 列 final static int ANGLE = 10; / 每个点间隔 final static int mark = 3; / 字的标志 static LinList b = new LinLista.length; / 链表数组 static boolean bool = true; / 判断标志 public static void main(String args) throws Exception HelloWorld s = new HelloWorld();
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1