找回密码
 立即注册

QQ登录

正在找L298Arduino电机驱动盾板的说明档

来源: 已解决 猫仔饼饼 2016-11-9 23:01 显示全部楼层 |阅读模式
L298Arduino扩展板已到手,说明书能贴出来吗?

IMG_20161109_180049.jpg
IMG_20161109_221950.jpg
回复

使用道具 举报

大神点评7

猫仔饼饼 2016-11-10 13:23 显示全部楼层
这有张类似的板子使用方法一样吗?

抄自网上的代码

/*Motor Shield: Two DC Motor Example*/
//Define the variables used in the sketch
/*DC_Motor1 connected in Channel A */
int pinDirA = 12;//Variable used to direct the Motor1
int pinBrkA = 9;//Varialble used to brake Motor1
int pinPwmA = 3;//Variable used to select the speed Motor1

/* DC_Motor2 connected in Channel B */
int pinDirB = 13;//Variable used to direct the Motor2
int pinBrkB = 8;//Variable used to brake the Motor2
int pinPwmB = 11;//Variable used to select the speed Motor2

void setup()
{
//initialize the Motor1
  pinMode(pinDirA, OUTPUT);
  //pinMode(pinPwmA, OUTPUT);
  pinMode(pinBrkA, OUTPUT);
//initialize the Motor2
  pinMode(pinDirB, OUTPUT);
// pinMode(pinPwmB, OUTPUT);
  pinMode(pinBrkB, OUTPUT);
}

void loop()
{
  //Test 1: Direction: Motor1 and Motor2 forward; Speed: Motor1 and Motor2 Max Speed
  /*Motor1*/
  digitalWrite(pinDirA, HIGH); //set forward the direction of Motor1
  digitalWrite(pinBrkA,LOW);   //disengage the brake for Motor1
  analogWrite(pinPwmA, 255);   //set max speed for Motor1
  /*Motor2*/
  digitalWrite(pinDirB, HIGH); //set  forward the direction of Motor2
  digitalWrite(pinBrkB,LOW);   //disengage the brake for Motor2
  analogWrite(pinPwmB, 255);   //set max speed for Motor2
  delay(2500);

  //Stop Motors
  digitalWrite(pinBrkA, HIGH);  //Engage the Brake for Channel A
  digitalWrite(pinBrkB, HIGH);  //Engage the Brake for Channel B
  delay(1000);

  //Test 2: Direction: Motor1 and Motor2 backward; Speed: Motor1 and Motor2 Max Speed
   /*Motor1*/
  digitalWrite(pinDirA,LOW);  //set backrward the direction of Motor1
  digitalWrite(pinBrkA,LOW);  //disengage the brake for Motor1
  analogWrite(pinPwmA, 255);  //set max speed for Motor1
  /*Motor2*/
  digitalWrite(pinDirB, LOW); //set  backward the direction of Motor2
  digitalWrite(pinBrkB,LOW);  //disengage the brake for Motor2
  analogWrite(pinPwmB, 255);  //set max speed for Motor2
  delay(2500);

  //Stop Motors
  digitalWrite(pinBrkA, HIGH);  //Engage the Brake for Channel A
  digitalWrite(pinBrkB, HIGH);  //Engage the Brake for Channel B
  delay(1000);

  //Test 3: Direction: Motor1 forward; Motor2 backfoward; Speed: Motor1 and Motor2 Max Speed
   /*Motor1*/
  digitalWrite(pinDirA,HIGH);  //set forward the direction of Motor1
  digitalWrite(pinBrkA,LOW);   //disengage the brake for Motor1
  analogWrite(pinPwmA, 255);   //set max speed for Motor1
  /*Motor2*/
  digitalWrite(pinDirB,LOW);   //set backrward the direction of Motor2
  digitalWrite(pinBrkB,LOW);   //disengage the brake for Motor2
  analogWrite(pinPwmB, 255);   //set max speed for Motor2
  delay(2500);

  //Stop Motors
  digitalWrite(pinBrkA, HIGH);  //Engage the Brake for Channel A
  digitalWrite(pinBrkB, HIGH);  //Engage the Brake for Channel B
  delay(1000);

  // Test 4: Direction: Motor1 backward; Motor2 forward; Speed: Motor1 and Motor2 Max Speed
/*Motor1*/
  digitalWrite(pinDirA,LOW);  //set backrward the direction of Motor1
  digitalWrite(pinBrkA,LOW);  //disengage the brake for Motor1
  analogWrite(pinPwmA, 255);  //set max speed for Motor1
  /*Motor2*/
  digitalWrite(pinDirB, HIGH); //set  forward the direction of Motor2
  digitalWrite(pinBrkB,LOW);  //disengage the brake for Motor2
  analogWrite(pinPwmB, 255);  //set max speed for Motor2
  delay(2500);

  //Stop Motors
  digitalWrite(pinBrkA, HIGH);  //Engage the Brake for Channel A
  digitalWrite(pinBrkB, HIGH);  //Engage the Brake for Channel B
  delay(1000);

}
A000079-Arduino-Motor-Shield-1front.jpg
motor-shield-2-motor-dc_bb.png
回复 支持 反对

使用道具 举报

猫仔饼饼 2016-11-11 04:54 显示全部楼层
本帖最后由 猫仔饼饼 于 2016-11-11 06:17 编辑

包装里没有说明,这和近200元的那块板子有区别吗?
还是仅仅外观不一样?
回复 支持 反对

使用道具 举报

奥松-Neil 2016-11-11 08:56 显示全部楼层
猫仔饼饼 发表于 2016-11-11 04:54
包装里没有说明,这和近200元的那块板子有区别吗?
还是仅仅外观不一样? ...

http://www.alsrobot.com.cn/wiki/ ... 1%E5%8A%A8%E6%9D%BF

可以参考一下wiki的产品资料
回复 支持 反对

使用道具 举报

猫仔饼饼 2016-11-11 14:41 显示全部楼层
谢谢你把资料发我,我试一试
回复 支持 反对

使用道具 举报

奥松-Neil 2016-11-16 16:25 显示全部楼层
猫仔饼饼 发表于 2016-11-11 14:41
谢谢你把资料发我,我试一试

上面给您的链接就是产品资料
回复 支持 反对

使用道具 举报

您可能感兴趣的文章

您需要登录后才可以回帖 登录 | 立即注册

关注0

粉丝1

帖子1

发布主题
社区热门 MORE+
    社区热帖 MORE+