确保include<MSMotorShield.h>头文件 使用DCMotor(motor#, frequency)创建DCMotor对象,构造函数带偶两个参数。第一个为要连接的电机的端口1,2,3,4。Frequency是速度控制信号的值。对于电机1和2你可以选择MOTOR12_64KHZ, MOTOR12_8KHZ, MOTOR12_2KHZ,...">
Home » Source Code » MSMotorShield.h

MSMotorShield.h

fsaa
2016-08-10 04:48:50
The author
View(s):
Download(s): 1
Point (s): 1 
Category Category:
c++,cc++,c AllAll

Description

family:宋体;">确保include<MSMotorShield.h>头文件

使用DCMotor(motor#, frequency)创建DCMotor对象,构造函数带偶两个参数。第一个为要连接的电机的端口1234Frequency是速度控制信号的值。对于电机12你可以选择MOTOR12_64KHZ, MOTOR12_8KHZ, MOTOR12_2KHZ, 或者 MOTOR12_1KHZ。一个高频率像64KHz将不会发出声音但是一个低频率想1KHz的将更省电。电机34只能运行在1KHz的频率下,将会忽略给定的任何频率设置。

然后你可以通过setSpeed(speed)函数来设置电机的速度,speed的范围为从0(停止)255(全速)。你可以随便设置你想要的速度。

Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
MSMotorShield0.00 B27-06-11|15:55
Examples0.00 B27-06-11|15:55
MotorParty0.00 B27-06-11|15:55
MotorParty.pde1.22 kB27-06-11|15:51
MotorTest0.00 B27-06-11|15:55
MotorTest.pde874.00 B27-06-11|15:52
StepperTest0.00 B27-06-11|15:55
StepperTest.pde872.00 B27-06-11|15:52
keywords.txt770.00 B27-06-11|15:51
MSMotorShield.cpp16.97 kB27-06-11|15:54
MSMotorShield.h2.05 kB27-06-11|15:49
...
Sponsored links

Comments

(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
  • 1
  • Page 1
  • Total 1

MSMotorShield.h (5.94 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D