Difference between revisions of "LilyPad Xbee"

From Geeetech Wiki
Jump to: navigation, search
(instruction:)
(Features)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
  
[[File:bee.jpg | 400px]]
+
[[File:bee.jpg | 350px]]
  
  
Line 10: Line 10:
 
Power supply:3.3V or 5V.If you have a power device who supplies 2V to 6V ,you should connect to “+” not the “3.3V” interface ,if the power is 3.3v you can connect to 3.3V interface directly.
 
Power supply:3.3V or 5V.If you have a power device who supplies 2V to 6V ,you should connect to “+” not the “3.3V” interface ,if the power is 3.3v you can connect to 3.3V interface directly.
 
Frequency  :The frequency reaches up to 2.4GHZ
 
Frequency  :The frequency reaches up to 2.4GHZ
Current Limiting Protection  
+
Current Limiting Protection
 +
 
 +
 
 +
==Download ==
 +
[http://www.ftdichip.com/Drivers/CDM/CDM%20v2.12.00%20WHQL%20Certified.exe FIDI driver]
  
 
== FAQ ==
 
== FAQ ==
  
Q1:How to judge the LilyPad Bee connect to power exactly?
+
Q1:How to judge the LilyPad Bee connect to power exactly?
A:When the LilyPad Bee connect to power exactly , the “PWR” LED is on and “STATE” LED is flashing;
+
A:When the LilyPad Bee connect to power exactly , the “PWR” LED is on and “STATE” LED is flashing;
Q:How to judge the LilyPad Bee connect to mobile Bluetooth software?
+
Q:How to judge the LilyPad Bee connect to mobile Bluetooth software?
A:When the LilyPad Bee connect to mobile Bluetooth software ,the “STATE” LED is on not flash.
+
A:When the LilyPad Bee connect to mobile Bluetooth software ,the “STATE” LED is on not flash.
  
 
== Example code ==
 
== Example code ==
Line 35: Line 39:
  
  
const int ledPin=13;//pin the led is connected to
+
const int ledPin=13;//pin the led is connected to
int blinkread=0;    //blink rate stored in this variable
+
int blinkread=0;    //blink rate stored in this variable
void setup()
+
void setup()
{
+
{
  Serial.begin(9600);//initialize serial port to send and receive at 9600 baud
+
  Serial.begin(9600);//initialize serial port to send and receive at 9600 baud
  pinMode(ledPin,OUTPUT);//set this pin sa output
+
  pinMode(ledPin,OUTPUT);//set this pin sa output
}
+
}
void loop()
+
void loop()
{
+
{
  blink();  
+
    blink();  
}
+
}
 
+
void serialEvent(void)
void serialEvent(void)
+
{
{
+
    while(Serial.available())
    while(Serial.available())
+
    {
    {
+
      char ch=Serial.read();
      char ch=Serial.read();
+
      //is this an ascii digit between 0 and 9?the data's type  received from  
      //is this an ascii digit between 0 and 9?the data's type  received from  
+
      //Mobile phone bluetooth serial port is String tpye
      //Mobile phone bluetooth serial port is String tpye
+
      if(isDigit(ch))
      if(isDigit(ch))
+
      {
      {
+
        blinkread=ch-'0';//ascii value converted to numeric value
        blinkread=ch-'0';//ascii value converted to numeric value
+
        blinkread*=100;  //actual rate is 100ms times received digit
        blinkread*=100;  //actual rate is 100ms times received digit
+
      }
      }
+
    }   
    }   
+
}
}
+
//blink the LED with the on and off times determined by blinkrate
//blink the LED with the on and off times determined by blinkrate
+
void blink()
void blink()
+
{
{
+
  digitalWrite(ledPin,HIGH);
  digitalWrite(ledPin,HIGH);
+
  delay(blinkread);
  delay(blinkread);
+
  digitalWrite(ledPin,LOW);
  digitalWrite(ledPin,LOW);
+
  delay(blinkread);
  delay(blinkread);
+
}
}
 
  
 
== Notes ==
 
== Notes ==
Line 103: Line 106:
 
== How to buy ==
 
== How to buy ==
  
Click here to buy
+
Click here to buy [http://www.geeetech.com/lilypad-xbee-p-822.html Lilypad Xbee]

Latest revision as of 01:01, 28 August 2015

Introduction

Bee.jpg


The LilyPad Bee is a radio transceiver that you can sew on to your clothing to create wearables or toy control or anywhere you want you to .The LilyPad Bee supply two power interface, one is 5V and the other is 3.3V,so you have more choices to select power supply .There is a communication interface that you can use to control other devices via serial port(In fact ,the following example code is just tested by this serial port source)

Features

Power supply:3.3V or 5V.If you have a power device who supplies 2V to 6V ,you should connect to “+” not the “3.3V” interface ,if the power is 3.3v you can connect to 3.3V interface directly. Frequency  :The frequency reaches up to 2.4GHZ Current Limiting Protection


Download

FIDI driver

FAQ

Q1:How to judge the LilyPad Bee connect to power exactly?
A:When the LilyPad Bee connect to power exactly , the “PWR” LED is on and “STATE” LED is flashing;
Q:How to judge the LilyPad Bee connect to mobile Bluetooth software?
A:When the LilyPad Bee connect to mobile Bluetooth software ,the “STATE” LED is on not flash.

Example code

Instruction:

The code tested successfullly by Arduino 1.0 IDE

  • BlueTooth module-------Aduino Board
  • Tx0 -------Rx
  • RXI -------TX
  • GND -------GND
  • 3.3V(+) -------3.3V(5V)



const int ledPin=13;//pin the led is connected to
int blinkread=0;    //blink rate stored in this variable
void setup()
{
  Serial.begin(9600);//initialize serial port to send and receive at 9600 baud
  pinMode(ledPin,OUTPUT);//set this pin sa output
}
void loop()
{
   blink(); 
}
void serialEvent(void)
{
    while(Serial.available())
    {
      char ch=Serial.read();
      //is this an ascii digit between 0 and 9?the data's type  received from 
      //Mobile phone bluetooth serial port is String tpye
      if(isDigit(ch))
      {
        blinkread=ch-'0';//ascii value converted to numeric value
        blinkread*=100;  //actual rate is 100ms times received digit
      }
    }  
}
//blink the LED with the on and off times determined by blinkrate
void blink()
{
  digitalWrite(ledPin,HIGH);
  delay(blinkread);
  digitalWrite(ledPin,LOW);
  delay(blinkread);
}

Notes

Pin layout is similar but not the same as the pin layout on the Bee. Certain pins have swapped to make sewing easier in projects that use the Arduino ,which has a different pin arrangement from the Bee;

Label Description

Label Description Bee Pin 3.3V connect regulated power only, nominally limited to 3.4 Volts 1 — ground 10 rx data in 2 tx data out 3 d08 digital output 8 (not supported yet) 4 rst reset 5 rssi received signal strength indicator / PWM output 0 6 pw1 PWM (pulse-width modulation) output 1 7 nc no connection 8 slp Sleep / digital input 8 / DTR 9 + connect unregulated Voltage here — ground (alternate connection) 10 d4 analog input 4 / digital input/output 4 11 d7 digital input/output 7 / CTS 12 on ON light output 13 vrf Voltage Reference for analog / digital inputs 14 asc association light output / analog input 5 / digital i/o 5 15 d6 analog input 6 / digital i/o 6 / RTS 16 d3 analog input 3 / digital i/o 3 17 d2 analog input 2 / digital i/o 2 18 d1 analog input 1 / digital i/o 1 19 d0 analog input 0 / digital i/o 0 20


How to buy

Click here to buy Lilypad Xbee