查看“Microduino-Shield Robot/zh”的源代码
←
Microduino-Shield Robot/zh
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{Language|Microduino-Robot/zh}} {| style="width: 800px;" [[File: Microduino-Robot-rect.jpg|400px|thumb|right|Microduino- Robot]] Microduino-ROBOT板子作为机器人控制板, 将配合[[Microduino-Core+/zh]]、[[Microduino-Motor/zh]]或[[Microduino-Stepper/zh]]。同时板载传感器接口,用户可接入各种传感器来实现更多的功能。 |- | ==特色== *两个电机驱动接口,可驱动两个步进电机,四个直流电机 *丰富的传感器接口,利于扩展 *5V、3.3V电源管理 *Upin27底座,可结合更多的Microduino模块 *板子体积小,46.99mm*40.64mm ==规格== *电气 **5V稳压:采用LM2674降压方案 **3.3V稳压:AMS1117降压方案 **因为采用降压方案,请确保电源电压5V~9V。 **电源开关 *电机驱动 **M.A:D7,D5,D8,D6(适用于Core核心,PWM调速) **M.B:D19,D23,D18,D22(适用于Core+核心,PWN调速) *板载9个传感器接口 *板载调试led灯,接到D4. *板载复位按键 [[file:Microduino-Robot_Rule1.JPG|thumb|600px|center]] [[file:Microduino-Robot_Rule2.JPG|thumb|600px|center]] ==文档== *芯片:'''[[File: LM2674.pdf]]''' ==开发== *驱动直流电机,参考:[[Microduino-Motor/zh]]: 示例程序: <source lang="cpp"> //=========M.A=============// int mic_left_A = 7; int mic_right_A = 5; int mic_head_A = 8; int mic_back_A = 6; //=========M.B=============// /* int mic_left_B = 22; int mic_right_B =18; int mic_head_B = 23; int mic_back_B = 19; */ void setup() { pinMode(mic_left_A,OUTPUT); pinMode(mic_right_A,OUTPUT); pinMode(mic_head_A,OUTPUT); pinMode(mic_back_A,OUTPUT); } void loop() { head(); delay(1500); back(); delay(1500); left(); delay(1500); right(); delay(1500); } void head() { digitalWrite(mic_left_A,LOW); digitalWrite(mic_right_A,HIGH); digitalWrite(mic_head_A,HIGH); digitalWrite(mic_back_A,LOW); } void left() { digitalWrite(mic_left_A,HIGH); digitalWrite(mic_right_A,LOW); digitalWrite(mic_head_A,HIGH); digitalWrite(mic_back_A,LOW ); } void right() { digitalWrite(mic_left_A,LOW); digitalWrite(mic_right_A,HIGH); digitalWrite(mic_head_A,LOW); digitalWrite(mic_back_A,HIGH); } void back() { digitalWrite(mic_left_A,HIGH); digitalWrite(mic_right_A,LOW); digitalWrite(mic_head_A,LOW); digitalWrite(mic_back_A,HIGH); } void stoop() { digitalWrite(mic_left_A,LOW); digitalWrite(mic_right_A,LOW); digitalWrite(mic_head_A,LOW); digitalWrite(mic_back_A,LOW); } </source> *驱动步进电机,参考:[[Microduino-Stepper/zh]] 示例程序: <source lang="cpp"> #include <AccelStepper.h> const int ENPin_A =8 ; // the number of the LED pin const int ENPin_B =23 ; // the number of the LED pin int motorSpeed = 9600; //maximum steps per second (about 3rps / at 16 microsteps) int motorAccel = 80000; //steps/second/second to accelerate int motorDirPin_A = 5; //digital pin 5 int motorStepPin_A = 7; //digital pin 7 int motorDirPin_B = 18; //digital pin 5 int motorStepPin_B = 22; //digital pin 7 //set up the accelStepper intance //the "1" tells it we are using a driver AccelStepper stepper_A(1, motorStepPin_A, motorDirPin_A); AccelStepper stepper_B(1, motorStepPin_B, motorDirPin_B); void setup(){ pinMode(ENPin_A, OUTPUT); pinMode(ENPin_B, OUTPUT); stepper_A.setMaxSpeed(motorSpeed); stepper_A.setSpeed(motorSpeed); stepper_A.setAcceleration(motorAccel); stepper_A.moveTo(3200); //move 32000 steps (should be 10 rev) stepper_B.setMaxSpeed(motorSpeed); stepper_B.setSpeed(motorSpeed); stepper_B.setAcceleration(motorAccel); stepper_B.moveTo(3200); //move 32000 steps (should be 10 rev) } void loop(){ digitalWrite(ENPin_A, LOW); digitalWrite(ENPin_B, LOW); //if stepper is at desired location if (stepper_A.distanceToGo() == 0){ //go the other way the same amount of steps //so if current position is 400 steps out, go position -400 stepper_A.moveTo(-stepper_A.currentPosition()); } //these must be called as often as possible to ensure smooth operation //any delay will cause jerky motion stepper_A.run(); if (stepper_B.distanceToGo() == 0){ //go the other way the same amount of steps //so if current position is 400 steps out, go position -400 stepper_B.moveTo(-stepper_B.currentPosition()); } //these must be called as often as possible to ensure smooth operation //any delay will cause jerky motion stepper_B.run(); } </source> ==应用== ==='''[[机器人平衡车]]'''=== ==='''[[BOXZ_mini机器人]]'''=== ==购买== ==历史== ==图库== *正面 [[file:Microduino-Robot-F.JPG|thumb|600px|center]] *背面 [[file:Microduino-Robot-b.JPG|thumb|600px|center]] ==视频== |}
该页面使用的模板:
模板:Language
(
查看源代码
)
模板:Nmbox
(
查看源代码
)
返回至
Microduino-Shield Robot/zh
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
Welcome
首页
创客大赛
大赛详情
3D打印
安装月球车
图形化编程
操控月球车
升级月球车
编程工具下载
软件下载
Arduino
Processing
Mixly
Scratch
模块套件
Microduino 102
mCookie 102
mCookie 202
mCookie 302
IBC
其他
应用套件
四轴飞行器
平衡车
小车CUBE
音乐播放器
刷卡音乐播放器
wifi气象站
彩虹音乐触摸灯
分贝检测仪
迎门汇报
LED点阵时钟
LED点阵屏幕
硬件
mCookie
Sensor
Microduino
MicroWrt
MicroNux
MicroRobot-Core
MicroRobot-CoreESP
ideaBoard
ideaBox
MicroMV
MicroAI
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息