Download Print this page

DFRobot Leonardo with Xbee R3 Manual

Advertisement

Quick Links

24/1/2017
DFRobot Leonardo with Xbee R3(SKU:DFR0221)
Contents
1  Introduction
2  Specification
3  Leonardo Pin Out
4  Xbee Tutorial
4.1  Sample Code
5  Connection diagram
6  Documents
Introduction
DFRobot Leonardo with Xbee socket is an Arduino Leonardo variant processor.The Arduino Leonardo is
based on the ATmega32u4 chip. It is the latest addition to the Arduino family. Compared with the earlier
Arduino controllers,by using the ATmega32U4 as its sole microcontroller, allows the Leonardo to be cheaper
and simpler to use.Also, because the 32U4 is handling the USB directly, code libraries are available which
allow the board to emulate a computer keyboard, mouse, and more using the USB­HID protocol!
Notice:This board is only supported in the latest Arduino IDE 1.0.1 or later version so you will also
need to update the IDE.
Specification
Input Voltage (recommended): 7­12V
Input Voltage (limits): 6­12V
Microcontroller:ATmega32u4
Operating Voltage: 5V
Interface: Micro USB
Compatible with Arduino R3 series pin mapping
Directly support Xbee and XBee form factor wifi,bluetooth and RF modules
Extend D14~D16 digital pins with 5v power supply
Clock Speed 16 MHz
Size: 70x55x14mm
Digital I/O Pins: 20
PWM Channels: 7
Analog Input Channels: 12
DC Current per I/O Pin: 40 mA
DC Current for 3.3V Pin: 800 mA
Flash Memory 32 KB (ATmega32u4) of which 4 KB used by bootloader
SRAM: 2.5 KB (ATmega32u4)
EEPROM: 1 KB (ATmega32u4)
Leonardo Pin Out
DFRduino Leonardo Pin Out
https://www.dfrobot.com/wiki/index.php/DFRobot_Leonardo_with_Xbee_R3(SKU:DFR0221)
DFRobot Leonardo with Xbee R3(SKU:DFR0221) ­ Robot Wiki
(/wiki/index.php/File:Leonardopinout.png)
(/wiki/index.php/File:Leonardo.jpg)
DFRduino Leonardo
1/3

Advertisement

loading

Summary of Contents for DFRobot Leonardo with Xbee R3

  • Page 1 24/1/2017 DFRobot Leonardo with Xbee R3(SKU:DFR0221) ­ Robot Wiki DFRobot Leonardo with Xbee R3(SKU:DFR0221) Contents 1  Introduction 2  Specification 3  Leonardo Pin Out 4  Xbee Tutorial 4.1  Sample Code 5  Connection diagram 6  Documents Introduction DFRobot Leonardo with Xbee socket is an Arduino Leonardo variant processor.The Arduino Leonardo is based on the ATmega32u4 chip. It is the latest addition to the Arduino family. Compared with the earlier Arduino controllers,by using the ATmega32U4 as its sole microcontroller, allows the Leonardo to be cheaper and simpler to use.Also, because the 32U4 is handling the USB directly, code libraries are available which allow the board to emulate a computer keyboard, mouse, and more using the USB­HID protocol! Notice:This board is only supported in the latest Arduino IDE 1.0.1 or later version so you will also need to update the IDE. Specification Input Voltage (recommended): 7­12V Input Voltage (limits): 6­12V (/wiki/index.php/File:Leonardo.jpg) Microcontroller:ATmega32u4 DFRduino Leonardo Operating Voltage: 5V Interface: Micro USB Compatible with Arduino R3 series pin mapping Directly support Xbee and XBee form factor wifi,bluetooth and RF modules Extend D14~D16 digital pins with 5v power supply Clock Speed 16 MHz Size: 70x55x14mm Digital I/O Pins: 20 PWM Channels: 7...
  • Page 2 24/1/2017 DFRobot Leonardo with Xbee R3(SKU:DFR0221) ­ Robot Wiki Xbee Tutorial DFRobot Leonardo with Xbee R3 has a Xbee socket.It uses Serial1 to communicate with Leonardo. Sample Code // # Description:  // It is just used to test Leonardo module  // Write by Grey  // Input  "p" once time the led will be turn on;twice to turn off.  // It is controled by Serial1 Xbee side only. but you can check the status from serial port.  int ledPin=13;    int val;           int count=0;  void setup()      {    pinMode(ledPin,OUTPUT);       Serial.begin(9600);          Serial1.begin(115200);  // Xbee Serial1 port baud rate should be set the same to the xbee baud rate  }  void loop()       {    val=Serial1.read();    // read xbee Serial1 data      if(‐1!=val)           // "‐1" means no data    {      if('p'==val){        if(count==0)count=1;        else if(count==1)count=0;      }      if(count==0){        digitalWrite(ledPin,HIGH);  // Turn on        Serial.println("LED ON");  // you can check the status from serial port.        Serial1.println("LED ON"); //you can check the status from serial1 port(xbee).      }      else if(count==1)      {        digitalWrite(ledPin,LOW);    // Turn off        Serial.println("LED OFF");  //you can check the status from serial port.        Serial1.println("LED OFF"); //you can check the status from serial1 port(xbee).      }     } ...
  • Page 3 24/1/2017 DFRobot Leonardo with Xbee R3(SKU:DFR0221) ­ Robot Wiki (/wiki/index.php/File:Monitor.png) DFRduino Leonardo With Xbee Documents Atmega32U4 datasheet (http://www.dfrobot.com/image/data/DFR0201/atmega32u4%20datasheet.pdf) Schematic (http://www.dfrobot.com/image/data/DFR0221/DFRduino%20Leonardo%20sch.pdf) Arduino Leonardo product page (http://arduino.cc/en/Main/ArduinoBoardLeonardo) Latest Arduino IDE (http://arduino.cc/en/Main/Software)  (/wiki/index.php/File:Nextredirectltr.png)Go Shopping DFRobot Leonardo with Xbee R3(SKU:DFR0221) (http://www.dfrobot.com/index.php? route=product/product&product_id=832) Categories (/wiki/index.php/Special:Categories):  Product Manual (/wiki/index.php/Category:Product_Manual) DFR Series (/wiki/index.php/Category:DFR_Series) MicroControllers (/wiki/index.php/Category:MicroControllers) This page was last modified on 5 November 2013, at 10:43. Content is available under GNU Free Documentation License 1.3 or later (https://www.gnu.org/copyleft/fdl.html) unless otherwise noted.  (https://www.gnu.org/copyleft/fdl.html)    (//www.mediawiki.org/) https://www.dfrobot.com/wiki/index.php/DFRobot_Leonardo_with_Xbee_R3(SKU:DFR0221)

This manual is also suitable for:

Dfr0221