(SKU:DFR0351)RoMeo BLE mini控制器V2.0

来自DFRobot Product Wiki
跳转至: 导航搜索
RoMeo BLE mini控制器V1.0

目录

概 述

RoMeo BLE mini控制器是RoMeo BLE控制器的微型版。在继承了RoMeo BLE所有功能的同时,具备了更小的尺寸。可以说是博采众长,集各大主控板的优点为一体。具备8路数字接口及4路模拟接口,可满足多路舵机控制及数字量的输入输出。RoMeo BLE mini控制器V2.0版自带的两路3.2A电机驱动,可以使它轻松带起小型移动平台,满足绝大部分小型机器人的应用开发。集成的蓝牙4.0无线通信模块,也使其拥有了无线通讯和无线编程的功能。这将是各大爱好者又一大好伙伴。


性能描述

  • BLE芯片:TI CC2540
  • 传输距离:空旷地带50m
  • 支持通过usb更新BLE芯片程序
  • 支持蓝牙远程更新Arduino程序
  • 支持蓝牙HID
  • 支持AT指令配置BLE
  • 支持串口透传
  • 支持主从机切换
  • 微处理器:ATmega328P
  • 引导装载程序:Arduino UNO
  • 8 通道数字 I/O
  • 4 PWM 通道 (Pin3,Pin9,Pin10,Pin11)
  • 4通道模拟输入
  • USB接口
  • 自动切换输入电源
  • ICSP下载程序接口
  • 串行接口TTL电平
  • 具有I2C接口
  • 2路3.2A电流的H桥电机驱动接口
  • 尺寸:45x38.5mm


控制器丝印说明

RoMeo BLE mini(V2.0)正面示意图
RoMeo BLE mini(V2.0)反面示意图
丝印 说明
+VIN— 电机驱动外接电源和控制器外接电源;+(正极)6~15V;-(负极)接地
+Servo— 数字口电源输入5~20V
M1/M2 2路电机控制端;M1:PIN4(方向控制),PIN5(PWM控制) M2:PIN7(方向控制),PIN6(PWM控制)
I2C I2C接口:SDA SCL GND 5V
A 5V GND 标准模拟接口;A(蓝色)模拟口0,1,2,3;5V(红色)电源正极;GND(黑色)电源负极
D VCC GND 标准数字接口;D(绿色)数字口2,3(pwm),8,9(pwm),10(pwm),11(pwm),12,13;VCC(红色)电源正极(当Servo端口未接电源时VCC为5V,当Servo端口接上电源时VCC为Servo端的输入电源);GND(黑色)电源负极
LED指示灯 PWR 电源指示灯;TX 发送数据指示灯;RX 接收数据指示灯;L D13信号指示灯;LINK 蓝牙连接指示灯;PAIR 蓝牙配对指示灯;
RESET 控制器复位按键
BOOT 蓝牙固件更新按键


RoMeo BLE mini应用示例

小伙伴们可以参考这个简单的应用做你的机器人,先介绍下这个应用吧:用到的是Romeo BLE mini控制器一个,小马达2个(不建议使用10V以上电机),电池一个。下面是实物连接图。

Romeo BLE mini(V2.0)硬件连接图

此程序通过串口接收命令来控制小车。
戳这里下载Romeo BLE mini库文件


//Standard PWM DC control
int E1 = 5;     //M1 Speed Control
int E2 = 6;     //M2 Speed Control
int M1 = 4;    //M1 Direction Control
int M2 = 7;    //M1 Direction Control



void stop(void)                    //Stop
{
  digitalWrite(E1,LOW);   
  digitalWrite(E2,LOW);      
}   
void advance(char a,char b)          //Move forward
{
  analogWrite (E1,a);      //PWM Speed Control
  digitalWrite(M1,HIGH);    
  analogWrite (E2,b);    
  digitalWrite(M2,HIGH);
}  
void back_off (char a,char b)          //Move backward
{
  analogWrite (E1,a);
  digitalWrite(M1,LOW);   
  analogWrite (E2,b);    
  digitalWrite(M2,LOW);
}
void turn_L (char a,char b)             //Turn Left
{
  analogWrite (E1,a);
  digitalWrite(M1,LOW);    
  analogWrite (E2,b);    
  digitalWrite(M2,HIGH);
}
void turn_R (char a,char b)             //Turn Right
{
  analogWrite (E1,a);
  digitalWrite(M1,HIGH);    
  analogWrite (E2,b);    
  digitalWrite(M2,LOW);
}
void setup(void) 
{ 
  int i;
  for(i=4;i<=7;i++)
    pinMode(i, OUTPUT);  
  Serial.begin(19200);      //Set Baud Rate
  Serial.println("Run keyboard control");
} 
void loop(void) 
{
  if(Serial.available()){
    char val = Serial.read();
    if(val != -1)
    {
      switch(val)
      {
      case 'w'://Move Forward
        advance (255,255);   //move forward in max speed
        break;
      case 's'://Move Backward
        back_off (255,255);   //move back in max speed
        break;
      case 'a'://Turn Left
        turn_L (100,100);
        break;       
      case 'd'://Turn Right
        turn_R (100,100);
        break;
      case 'z':
        Serial.println("Hello");
        break;
      case 'x':
        stop();
        break;
      }
    }
    else stop();  
  }
}



RoMeo BLE mini手机连接示例

RoMeo BLE mini的手机连接示例请参考Bluno 手机连接示例



通过BLE进行无线编程

RoMeo BLE mini 无线编程下载请参考Bluno 无线编程下载




通过AT指令配置BLE设备

RoMeo BLE mini AT 命令的配置方式也与Bluno相同,请参考Bluno AT 命令表



升级RoMeo BLE mini上的BLE固件(AT+VERSION查询版本)

RoMeo BLE mini升级固件的方法和BLUNO相似, 请参考BLUNO的Wiki中"升级BLUNO上的BLE固件"章节

ICSP接口说明

ICSP接口说明如图:

RoMeo BLE mini(V2.0)-ICSP接口
  • ICSP1 Atmega328p
  • ICSP2 CC2540

更多

Romeo BLE mini库文件
Romeo BLE mini原理图

Nextredirectltr.png购买 RoMeo BLE mini控制器V1.0 (SKU:DFR0351)

个人工具
名字空间

变换
操作
导航
工具箱