Romeo_for_Edison_Controller_SKU__DFR0331-DFRobot

Introduction

Romeo for Intel Edison is a multi-purpose, all-in-one development platform based on Intel Edison and Arduino SoC. It is especially designed to be useful for robotics applications. Romeo for Intel Edison is compatible with Arduino open source platform and Linux, and supports Java and C development environment. Users are able to extend this platform with thousands of existing shields and modules such as switches, sensors, LEDs, servos, motors easily with Romeo for Intel Edison. It can also be used as a standalone communication platform for software like flash, processing, Max/MSP and VVVV. The integrated 2 way DC motor driver and wireless capability allows you to start your project immediately without the need of any additional motor driver or wireless shield. The Romeo for Intel Edison inherits all functions of the Romeo all-in-one controller by integrating powerful functions the Intel Edison board possesses. You can describe it as a control board specially designed for robotics applications, carrying the powerful gene of Intel Edison and being compatible with Arduino.

NOTE: According to the Arduino IDE version update and Intel update, the wiki might be out of date, you could visit FAQ for proper solution.

Specification

*Operating Voltage :5V
*Output Voltage :5V/3.3V
*Input Voltage(limits) :6-20V
*Digital I/O pins :14
*Analog I/O pins :6
*DC Current per I/O Pin :10mA
*Motor Driver Constant Current :2 x 2A
*Size :100x88x15mm

Application

Pinout Diagram

Romeo for Edison Controller

Tutorial

Romeo for Edison Controller Quick Start

A.The Construction of the Hardware Environment

Part List:

Part List

Hardware Connection Diagram

Hardware Connection Diagram

B.The Construction of the Software Environment

Operating System

Windows 8.1

Compile Environment

A.Edison Arduion IDE

Download Edison Arduion IDE(winwos version)

Extract to your local folder.

NOTE: There is a bug with Edison Arduion IDE, you have to change your PC location to U.S to avoid IDE FC.

Control Panel-->Change data, time or number formats-->Format-->English(United States) ! DFR0331_Postition.png

Open Edison Arduion IDE

B.Install Driver

Download FTDI drivers

Install CDM v2.10.00 WHQL Certified.exe

DFR0331_driver1.png

DFR0331_driver2.png

Download Intel Edison Drivers DFR0331_Edison_driver.png

Install Edison Driver

DFR0331_Edison_driver1.png DFR0331_Edison_driver2.png DFR0331_Edison_driver3.png

Open the Device Manager, and check Device Driver

DFR0331_Edison_Device_Manager.png

C.Quick test with the module

Open Edison Arduino IDE and open a sample code "Blink"

DFR0331_Edison_Quicktest_Blink.png

Select Tools-->Board-->Intel Edison Select Tools-->Serial Port-->COM xx

DFR0331_Edison_Quicktest_Board.png

When the uploading has been finished, the LED will be flashing once a second.

DFR0331_Edison_Quicktest_Board_Blink.png

Romeo for Edison Controller Typical Applications

Digital Application

Part List and Hardware Connection:

DFR0331_Led_Blink.png

Sample code: Open Arduino IDE, Select Boards -->Intel Edison and COM port

int led = 13;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}
B.Button Test

Part List and Hardware Connection:

DFR0331_Button_Test.png

Sample code: Open Arduino IDE, Select Boards -->Intel Edison and COM port


int buttonPin = 2;     // Define Button Pin D2
int ledPin =  13;      // Define LED Pin D13

int buttonState = 0;

void setup() {
  pinMode(ledPin, OUTPUT);     // Define D13 Output Mode
  pinMode(buttonPin, INPUT);   // Define D2 Input Mode
}

void loop(){
  buttonState = digitalRead(buttonPin);  //Read D2 Status

  if (buttonState == HIGH) {
    digitalWrite(ledPin, HIGH);   //Turn On LED
  }
  else {
    digitalWrite(ledPin, LOW);    //Turn Off LED
  }
}
C.Servo Control

Part List and Hardware Connection:

DFR0331_Servo_Control.png

Sample code: Open Arduino IDE, Select Boards -->Intel Edison and COM port

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
                // a maximum of eight servo objects can be created

int pos = 0;    // variable to store the servo position

void setup()
{
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}


void loop()
{
  for(pos = 0; pos < 180; pos += 1)  // goes from 0 degrees to 180 degrees
  {                                  // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for(pos = 180; pos>=1; pos-=1)     // goes from 180 degrees to 0 degrees
  {
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
}
NOTE: Only PWM interface could control the Servo.
D.Motor Control
Note: We made a lot of update for "Romeo for Edison main board", to manage them easily we have moved it on github.
NG.ino is ATmega8 firmware; DFRobotEdison is Romeo motor and analog driver library.

New Romeo for Edison library Old Romeo for Edison library

Note:
The product manufactured after Sep. 2015 have burned the newest firmware. Please use the corresponding library to avoid bugs.
For the older product, you could update ATmega8 firmware to use the newest library.

Leave the downloaded library file under Arduino library folder: e.g. arduino-1.6.3\libraries Directory.

Part List and Hardware Connection:

DFR0331_Motor_Control.png

Sample code: Open Arduino IDE, Select Boards -->Intel Edison and COM port

/*
 *Copyright (c) 2014, Chengdu Geeker Technology Co., Ltd.
 *All rights reserved
 *
 *FileName : Motor.ino
 *File Tag :
 *Summary  : moter control example
 *
 *Version  : V1.2
 *Author   : ouki.wang(ouki.wang@dfrobot.com)
 *Time     : 2015.10.10

 *Version  : V1.1
 *Author   : weibing.deng(15196617738@163.com)
 *Time     : 2015.1.7
 *
 *Version  : V1.0
 *Author   : weibing.deng(15196617738@163.com)
 *Time     : 2014.12.22
 */
#include <DFRobot.h>
#include <IIC1.h>
DFrobotEdison Motor1;
DFrobotEdison Motor2;

void setup() {
  Motor1.begin(M1); /*Initialize motor1*/
  Motor2.begin(M2); /*Initialize motor2*/
}

void loop() {
  Motor2.move(); /*motor rotate with the fastest speed*/
  Motor1.move();
  delay(3000);
  Motor2.setDirection(CLOCKWISE); /*Motor M2 clockwise rotation*/
  Motor1.setDirection(CLOCKWISE); /*Motor M1 clockwise rotation*/

  Motor2.setSpeed(100); /*set speed 100(0-255)*/
  Motor1.setSpeed(100); /*set speed 100(0-255)*/
  delay(3000);

  Motor2.setDirection(ANTICLOCKWISE); /*Motor M2 anticlockwise rotation*/
  Motor2.setSpeed(200); /*set speed 200(0-255)*/
  Motor1.setDirection(ANTICLOCKWISE); /*Motor M1 anticlockwise rotation*/
  Motor1.setSpeed(200); /*set speed 300(0-255)*/
  delay(3000);

  Motor2.stop(); /*stop moter*/
  Motor1.stop(); /*stop moter*/
  delay(3000);
}

Analog Application

A.Analog Read

Part List and Hardware Connection:

NOTE: As Romeo for Edison is using ATmega 8 as Analog pins driver. Please download the DFRobot4Edison library first.
The library is keeping update, so some sample code and picture will be different to the old one.

Sample code: Open Arduino IDE, Select Boards -->Intel Edison and COM port In this section, please down load the DFRobot4Edison library first.

/*
 *Copyright (c) 2014, Chengdu Geeker Technology Co., Ltd.
 *All rights reserved
 *
 *File Name : analogRead.ino
 *File Tag  :
 *Summary   : A0-A5 port Analog reading example
 *
 *Version   : V1.0
 *Author    : weibing.deng(15196617738@163.com)
 *Time      : 2014.12.22
 */
#include <DFRobot.h>
#include <IIC1.h>

unsigned int value = 0;

void setup() {
 Serial.begin(9600);
}

void loop() {
  value = analogRead(A0);
  Serial.print("A0=");Serial.println((int)value);
  value = analogRead(A1);
  Serial.print("A1=");Serial.println((int)value);
  value = analogRead(A2);
  Serial.print("A2=");Serial.println((int)value);
  value = analogRead(A3);
  Serial.print("A3=");Serial.println((int)value);
  value = analogRead(A4);
  Serial.print("A4=");Serial.println((int)value);
  value = analogRead(A5);
  Serial.print("A5=");Serial.println((int)value);

  delay(2000);
}

Atmega8 Firmware Upgrade

Tools: FTDI programmer x1 Download the newest Atmega8 firmware here (The newest firmware fixed IIC communication bug)

DFR0331_Atmega8_firmware.png

If you find that there is something wrong with Analog input pins and motor driver, please update the ATmega8 firmware.

  1. Plug FTDI module on the Romeo (FTDI module's pin map should be located on 3.3V)
  2. Open Arduino IDE, select the right board ATmega8 (It is in the Arduino NG and older——>Processer "ATmega168"——>"ATmega8")
  3. Update the last github firmware.
  4. Done!

FAQ

Q&A Some general Arduino Problems/FAQ/Tips
Q1 No Arduino for Edison IDE download link could be found from the link you give, i.e.Intel ... Downloads, and after I finished installing all software, I got newest Arduino IDE 1.6, and there is no place for me to choose Intel to upload Blink.ino, what should I do?
A1 Welcome! You can go to Tools > Board > Boards Manager..., and find Intel i686 Edison, click Install to make it. After you install the needed files, you could see Intel choice.
Q2 Win XP/ Win 7 incompatible issue.
A2 Interl Edison has a compatible issue on Win 7/Win XP, please upgrade your Operating System to Win 8/10.
Q3 My motors lose control/ Analog reading error/ TWI(IIC) communication not good.
A3 It is for the TWI(IIC) issue, please upgrade Atmega8 firmware to the newest version, and use the corresponding newest library.
Q4 I can't debug via COM port without OTG plugged.
A4 Internal Edison will detect the value of "VBUS" pin, and it doesn't permit debugging while "VBUS" is LOW. It means you need connect a OTG cable to OTG port.(It doesn't need to connect anything to OTG cable), when you want to debug Edison via the COM port.
Q5 I'm using Intel XDK to develope your Romeo board rev 1.0. I have the code from the example library and work perfectly with Intel Edison Breakout Kit (Groove kit) board, but when I run it on Romeo board it’s fire error. I checked all the ports and they are mixed. Do you have the table where is the ports?
A5 The pin-mapping is different from Eclipse/Intel XDK and Arduino IDE. And you can leave out the mapping problem, just use the lable D0-D13,A0-A5 on Romeo for Edison, and use Arduino IDE to develope your program according to our wiki. If you do need the mapping table for Intel XDK/ Eclipse development, please contact Intel official site for help. Thanks for your understanding!

image:DFR0350 install edison in arduino 1.6 1.png| Q1. 1 Open Boards Manager image:DFR0350 install edison in arduino 1.6 2.png| Q1. 2 Install i686 Edison image:DFR0350 install edison in arduino 1.6 3.png| Q1. 3 Waiting to install finished image:DFR0350 install edison in arduino 1.6 4.png| Q1. 4 Choose the target board, Intel® Edison

For any question/ advice/ cool idea to share with us, please visit DFRobot Forum. |

Development Tools