Microduino-Shield Robot/zh
Language | English |
---|
Microduino-ROBOT板子作为机器人控制板, 将配合Microduino-Core+/zh、Microduino-Motor/zh或Microduino-Stepper/zh。同时板载传感器接口,用户可接入各种传感器来实现更多的功能。
特色
规格
文档开发
示例程序: //=========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_A = 22;
int mic_right_A =18;
int mic_head_A = 23;
int mic_back_A = 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);
}
应用机器人平衡车购买历史图库
视频 |