显示页面修订记录反向链接回到顶部 本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。 ====== 25MM直流电机 ====== ===== 1. 电机概述 ===== <html><body> <p class=MsoNormal style='text-indent:32.0pt'><span lang=EN-US style='font-size:16.0pt;line-height:105%;font-family:宋体'>25MM</span><span style='font-size:16.0pt;line-height:105%;font-family:宋体'>直流电机顾名思义,即外直径为<span lang=EN-US>25</span>毫米的直流电机,是<span lang=EN-US>Weeemake</span>平台一款常用的电机,有各个不同的转速可供选择,适应不同的需求,它能提供比<span lang=EN-US>TT</span>直流电机更强的动力驱动,其有专用的电机金属固定架,可方便与<span lang=EN-US>Weeemake</span>机械零件组装,扩展性能强。</span></p> </body></html> {{ :wm_wiki:25mm_dc_motor:pasted:20200310-161048.png }} ===== 2. 电机参数 ===== <html><body> </body></html> ===== 3. 编程指南 ===== ==== 3.1. 模块功能及图形化编程指南 ==== <html><body> <p class=MsoNormal style='text-indent:32.0pt'><span style='font-size:16.0pt; line-height:105%;font-family:等线;color:#666666;background:white'>该电机支持的图形化编程平台有</span></span><span lang=EN-US style='font-size:16.0pt;line-height:105%;font-family:"Helvetica",sans-serif; color:#666666;background:white'><span style='box-sizing: border-box;font-variant-ligatures: normal; font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px; text-decoration-style: initial;text-decoration-color: initial;word-spacing: 0px'>WeeeCode</span></span><span style='font-size:16.0pt;line-height:105%; font-family:等线;color:#666666;background:white'><span style='box-sizing: border-box; font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align: start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px'>、编程猫平台、</span></span><span lang=EN-US style='font-size:16.0pt;line-height:105%;font-family:"Helvetica",sans-serif; color:#666666;background:white'><span style='box-sizing: border-box;font-variant-ligatures: normal; font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px; text-decoration-style: initial;text-decoration-color: initial;word-spacing: 0px'>Mixly_Arduino</span></span><span style='font-size:16.0pt;line-height:105%; font-family:等线;color:#666666;background:white'><span style='box-sizing: border-box; font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align: start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px'>、</span></span><span lang=EN-US style='font-size:16.0pt;line-height:105%;font-family:"Helvetica",sans-serif; color:#666666;background:white'><span style='box-sizing: border-box;font-variant-ligatures: normal; font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px; text-decoration-style: initial;text-decoration-color: initial;word-spacing: 0px'>MakeCode</span></span><span style='font-size:16.0pt;line-height:105%; font-family:等线;color:#666666;background:white'><span style='box-sizing: border-box; font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align: start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px'>等,其图形化编程大同小异,区别不会很大。</span></span></p> <div align=center> <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse'> <tr style='height:24.7pt'> <td width=244 valign=top style='width:183.3pt;border:solid windowtext 1.0pt; padding:0cm 5.4pt 0cm 5.4pt;height:24.7pt'> <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; text-align:center;line-height:normal'><b><span style='font-size:14.0pt; font-family:等线;color:black;background:white'>模块功能</span></b></p> </td> <td width=189 valign=top style='width:142.05pt;border:solid windowtext 1.0pt; border-left:none;padding:0cm 5.4pt 0cm 5.4pt;height:24.7pt'> <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; text-align:center;line-height:normal'><b><span style='font-size:14.0pt; font-family:等线;color:black;background:white'>需传参数</span></b></p> </td> <td width=455 valign=top style='width:341.05pt;border:solid windowtext 1.0pt; border-left:none;padding:0cm 5.4pt 0cm 5.4pt;height:24.7pt'> <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; text-align:center;line-height:normal'><b><span style='font-size:14.0pt; font-family:等线;color:black;background:white'>图形化编程块举例</span></b><b style='box-sizing: border-box;font-variant-ligatures: normal;font-variant-caps: normal; orphans: 2;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px'><span style='box-sizing: border-box'><span lang=EN-US style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:black;background:white'>(</span></span></b><b style='box-sizing: border-box; font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2; widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px'><span style='box-sizing: border-box'><span style='font-size:14.0pt;font-family:等线;color:black;background:white'>其他平台图形化编程块大同小异</span></span></b><b style='box-sizing: border-box;font-variant-ligatures: normal;font-variant-caps: normal; orphans: 2;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px'><span style='box-sizing: border-box'><span lang=EN-US style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:black;background:white'>)</span></span></b></p> </td> </tr> <tr> <td width=244 style='width:183.3pt;border:solid windowtext 1.0pt;border-top: none;padding:0cm 5.4pt 0cm 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='font-size:14.0pt; font-family:等线;color:black;background:white'>驱动电机运作</span></p> </td> <td width=189 style='width:142.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0cm 5.4pt 0cm 5.4pt'> <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: normal'><span style='font-size:14.0pt;font-family:等线;color:black;background: white'>(</span><span lang=EN-US style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:black;background:white'><span style='box-sizing: border-box;font-variant-ligatures: normal; font-variant-caps: normal;orphans: 2;widows: 2;-webkit-text-stroke-width: 0px; text-decoration-style: initial;text-decoration-color: initial;word-spacing: 0px'>2</span></span><span style='font-size:14.0pt;font-family:等线;color:black; background:white'>个参数)所接端口</span><span style='font-size:14.0pt;font-family: 宋体;color:black;background:white'>、速度<span lang=EN-US>(-255~255)</span></span></p> </td> <td width=455 valign=top style='width:341.05pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0cm 5.4pt 0cm 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; text-align:center;line-height:normal'><span lang=EN-US><img width=328 height=64 id="图片 1" src="lib/exe/fetch.php?media=wm_wiki:tt_dc_motor:pasted:20200310-150145.png"></span></p> </td> </tr> </table> </div> <p class=MsoNormal style='text-indent:36.0pt'><b><span lang=EN-US style='font-size:5.0pt;line-height:105%;font-family:等线;color:#ffffff; background:yellow'><o:p> </o:p></span></b></p> <p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-size:16.0pt; line-height:105%;font-family:等线;color:#666666;background:yellow'>备注:</span></b><span style='font-size:16.0pt;line-height:105%;font-family:黑体;color:#666666; background:white'>电机转速正负定义,电机轴面向人,速度值为正:顺时针转;速度值为负:逆时针转</span></p> <p class=MsoNormal style='text-indent:36.0pt'><b><span lang=EN-US style='font-size:5.0pt;line-height:105%;font-family:等线;color:#ffffff; background:yellow'><o:p> </o:p></span></b></p> <p class=MsoNormal style='text-indent:36.0pt'><span style='font-size:16.0pt; line-height:105%;font-family:等线;color:#666666;background:white'>图形化编程示例:</span></span></p> </body></html> {{ :wm_wiki:tt_dc_motor:pasted:20200310-150534.png }} ==== 3.2. 文本代码编程指南 ==== <html><body> <p class=MsoNormal style='text-indent:32.0pt'><span style='font-size:16.0pt; font-family:等线'>Arduino编程示例:</span></p> </body></html> <sxh cpp; first-line: 1;highlight: [3,4,13,14,16,17,19,20,22,23]; title: we_dcmotor_test.ino> #include "WeELF328P.h" WeDCMotor motor1(M1); WeDCMotor motor2(M2); uint8_t motorSpeed = 100; void setup() { } void loop() { motor1.run(motorSpeed); motor2.run(motorSpeed); delay(2000); motor1.stop(); motor2.stop(); delay(500); motor1.run(-motorSpeed); motor2.run(-motorSpeed); delay(2000); motor1.stop(); motor2.stop(); delay(500); } </sxh> ===== 4. 注意事项 ===== <html><body> <p class=MsoNormal style='text-indent:32.0pt;mso-char-indent-count:2.0'><span style='font-size:16.0pt;mso-ascii-font-family:Helvetica;mso-hansi-font-family: Helvetica;mso-bidi-font-family:Helvetica;color:#222222;background:white'>不能长时间快速正反转,这样会造成电流过大,发热量大,烧毁模块上的驱动芯片。</span></p> </body></html>