BLE Development Shield

From ELECFREAKS-WIKI
Jump to: navigation, search

Introduction

The BLE Development Shield for BLEduino is specially designed for BLEduino (BLE with Arduino Uno), which is first of its kind in intergrating BT 4.0(BLE) module into Arduino Uno. Together with BLEduino, this BLE Shield forms an ideal prototyping platform for both software and hardware developers to go wireless. You will be able to develop your own smart bracelet, smart pedometer, etc. It's a low-power, real-time low energy communication perfect for embedded designs. With built-in seven main functional modules, this BLE Development Shield is dedicated to aid interactions between your BLEduino and the physical world.

If you feel the above functions are not able to provide for your specific needs, we have open sourced both the hardware and software so that you can DIY your own interface alongside with your prototypes. Also with our Sensors Shield , hundreds of sensors and shields will make it even more powerful. Enjoy making!


Model: EF02222

BLE1.jpg BLE2.jpg BLE3.jpg

Feature

  • 128x64 OLED Screen
  • Buzzer
  • DHT11 Temperature & Humidity Sensor
  • 1.5A Relay
  • RGB LED
  • Helical Potentiometer
  • Joystick
  • 6-axis motion sensor: MP6050
  • The two leads MCU digital pins and analog pins
  • Size: 75mm*55mm

Application

  • BLE development
  • Industrial remote control and detection
  • Automated data collection
  • Bluetooth remote control toys
  • RGB LED control display system
  • Smart home, industrial control

Electronic Properties

Ec.jpg

Module Description

Md(1).jpg

Specification

Dimensions

BLE size.jpg

Hardware and software preparation

Bleshield1.png

  • Hardware:

1.USB Cable

2.Freduino UNO

3.BLE Development shield

  • Software:

1.Arduino IDE

2.BLEShield Arduino Library

Usage

Part 1 Download BLEShield Library and input the Arduino IDE Libraries Directory.

Part 2 Plug BLE Development shield into BLEduino board and connect to computer via USB

Bleshield2.png


Part 3 Programming

     Open the program you need to download via Arduino IDE. Choose Arduino UNO at TOOL->Board and corresponding serial port at TOOL->Serial. As shown in the following picture.

and select BLEShield example.

SerialPort.png

Board.png

HumDemo.png

After selecting the motherboard and serial port, click on the download button you will be able to download the program. When you are downloading it, TX,RX lights will glint. Notes:When programming USB,Bluetooth of BLEduino can’t connect with other Bluetooth,but to disconnect it!When the Bluetooth is disconnected, link light will glint constantly.

Successful programming will appear the following result. As shown in the figure below.

Part 2 BLE Development shield Demo Code test

NOTICE:if you want use this demo code,you must download BLEShield Library put into Arduino IDE libraries directorys. If you want learn more about this board use tutorials,Please visit BLEDuino page.

1 Buzzer test

  • 1.Select Serial Port in Arduino IDE

SerialPort.png

  • 2.Select Correct Board in Arduino IDE

Board.png

  • 3.Select BuzzerDemo code in BLEShield library

BuzzerDemo.png

  • 4.Download BuzzerDemo in FreaksDuino UNO board

Download.png

  • 5.Operation result

  the Buzzer sound two seconds and stop two seconds

  • 6.Buzzer Arduoino Demo Code

<syntaxhighlight lang="php"> /********************************************************************* Editor: Dragon E-Mail: Dragon@elecfreaks.com Date: 2016.1.12 Version: V1.1 Description

  This is a test for Buzzer on BLE shield
  

Product page:

  http://www.elecfreaks.com/estore/index.php/ble-development-shield.html
                                                                                                                                          • /
  1. include "BLEShield.h"

BLEShield myBleShield; void setup() {

 myBleShield.begin();    

}

// the loop routine runs over and over again forever: void loop() {

 myBleShield.setBuzzer(true);   // turn the LED on (HIGH is the voltage level)
 delay(2000);                   // wait for a second
 myBleShield.setBuzzer(false);  // turn the LED off by making the voltage LOW
 delay(2000);                   // wait for a second 

} </syntaxhighlight>


2 OLED screen test

  • 1.Select Serial Port in Arduino IDE

SerialPort.png

  • 2.Select Correct Board in Arduino IDE

Board.png

  • 3.Select OledDemo code in BLEShield library

OledDemo.png

  • 4.Download OledDemo in FreaksDuino UNO board

Download.png

  • 5.Operation result
  the oled will display "hello world" string

Oleddisplay.png

  • 6.Oled Arduino Demo code

<syntaxhighlight lang="php"> /********************************************************************* Editor: Dragon E-Mail: dragon@elecfreaks.com Date: 2016.1.12 Version: V1.1 Description

  This is a test for SSD1306 on BLE shield
  SSD1306 OLED driver is based on u8glib.
  You can find u8glib for arduino at:
  https://code.google.com/p/u8glib/
  

Product page:

  http://www.elecfreaks.com/estore/index.php/ble-development-shield.html
                                                                                                                                          • /
  1. include "BLEShield.h"
  2. include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); BLEShield myBLEShield;

void setup() {

 u8g.setColorIndex(1);             //displayMode : u8g_MODE_BW
 myBLEShield.begin();

}

void loop() { u8g.firstPage(); do { draw(); } while(u8g.nextPage()); delay(500); }

//Display function //also see https://code.google.com/p/u8glib/wiki/tpictureloop

void draw (void) { u8g.setFont(u8g_font_unifont); u8g.drawStr(0,22,"Hello World"); } </syntaxhighlight>


3 Temperature and humidity test

  • 1.Select Serial Port in Arduino IDE

SerialPort.png

  • 2.Select Correct Board in Arduino IDE

Board.png

  • 3.Select HumAndTempDemo code in BLEShield library

HumDemo.png

  • 4.Download HumAndTempDemo in FreaksDuino UNO board

Download.png

  • 5.Operation result
  Serial port will print temperature and humidity value every two seconds 

Tempvalue.png

  • 6.Temprature and humidity Arduino Demo Code
<syntaxhighlight lang="php">

/********************************************************************* Editor: Dragon E-Mail: dragon@elecfreaks.com Date: 2016.1.12 Version: V1.1 Description

  This is a test for DHT11 on BLE shield
  

Product page:

  http://www.elecfreaks.com/estore/index.php/ble-development-shield.html
                                                                                                                                          • /
  1. include "BLEShield.h"

BLEShield myBLEShield; void setup() {

 Serial.begin(115200);   
 myBLEShield.begin(); 
 Serial.println("BLEShield H/T test!");   

}

// the loop routine runs over and over again forever: void loop() {

 float h = myBLEShield.readHumidity();
 float t = myBLEShield.readTemperature();
 Serial.print("Humidity: "); 
 Serial.print(h);
 Serial.print(" %\t");
 Serial.print("Temperature: "); 
 Serial.print(t);
 Serial.println(" *C");
 delay(2000);                   // wait for a second 

} </syntaxhighlight>


4 JOYSTICK test

  • 1.Select Serial Port in Arduino IDE

SerialPort.png

  • 2.Select Correct Board in Arduino IDE

Board.png

  • 3.Select joystickDemo code in BLEShield library

JoystickDemo.png

  • 4.Download joystickDemo in FreaksDuino UNO board

JoystickDemo.png

  • 5.Operation result
 When shift rocker up the serial port will print "up" string

JoystickValue.png

  • 6.Joystick Arduino Demo Code
<syntaxhighlight lang="php">

/********************************************************************* Editor: Dragon E-Mail: dragon@elecfreaks.com Date: 2016.1.12 Version: V1.1 Description

  This is a test for Joystick on BLE shield
  

Product page:

  http://www.elecfreaks.com/estore/index.php/ble-development-shield.html


                                                                                                                                          • /
  1. include "BLEShield.h"
  2. define RIGHT 1
  3. define UP 2
  4. define LEFT 3
  5. define DOWN 4
  6. define PUSH 5
  7. define MID 0

BLEShield myBLEShield; void setup() {

 Serial.begin(115200);   
 myBLEShield.begin(); 
 Serial.println("BLEShield Joystick test!");   

}

// the loop routine runs over and over again forever: void loop() {

 //if the joystick is changed, joystickAvailable() will return true.
 if (myBLEShield.joystickAvailable()){  
   switch (myBLEShield.readJoystick()){
     case RIGHT:
     Serial.print("Joystick:");
     Serial.println("RIGHT");
     break;
     case LEFT:
     Serial.print("Joystick:");
     Serial.println("LEFT");
     break;
     case UP:
     Serial.print("Joystick:");
     Serial.println("UP");
     break;
     case DOWN:
     Serial.print("Joystick:");
     Serial.println("DOWN");
     break;
     case PUSH:
     Serial.print("Joystick:");
     Serial.println("PUSH");
     break;
     case MID:
     Serial.print("Joystick:");
     Serial.println("MID");
     break;
     default:
     break;		
   }
 }

} </syntaxhighlight>


5 Relay test

  • 1.Select Serial Port in Arduino IDE

SerialPort.png

  • 2.Select Correct Board in Arduino IDE

Board.png

  • 3.Select RelayDemo code in BLEShield library

RelayDemo.png

  • 4.Download RelayDemo in FreaksDuino UNO board

Download.png

  • 5.Operation result
  the Relay open two seconds and close two seconds
  • 6.Relay Arduino Demo Code

<syntaxhighlight lang="php"> /********************************************************************* Editor: Dragon E-Mail: dragon@elecfreaks.com Date: 2016.1.12 Version: V1.1 Description

  This is a test for Relay on BLE shield
  

Product page:

  http://www.elecfreaks.com/estore/index.php/ble-development-shield.html
                                                                                                                                          • /
  1. include "BLEShield.h"

BLEShield myBLEShield; void setup() {

 myBLEShield.begin();    

}

// the loop routine runs over and over again forever: void loop() {

 myBLEShield.setRelay(true);   // turn the LED on (HIGH is the voltage level)
 delay(2000);                  // wait for a second
 myBLEShield.setRelay(false);  // turn the LED off by making the voltage LOW
 delay(2000);                  // wait for a second

} </syntaxhighlight>

Version Tracker

Revision Descriptions Release
v0.9b Initial public release 2016.1.12

Bug Tracker

Bug Tracker is the place you can publish any bugs you think you might have found during use. Please write down what you have to say, your answers will help us improve our products.

Additional Idea

The Additional Idea is the place to write your project ideas about this product, or other usages you've found. Or you can write them on Projects page.

Resources

How to buy

Click here to buy:

http://www.elecfreaks.com/estore/ble-development-shield.html

See Also

Other related products and resources.

Licensing

This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are licensed under GPL/LGPL, see source code files for details.

External Links

Links to external webpages which provide more application ideas, documents/datasheet or software libraries