Digital Design W/S Arduino 101 Bluetooth Interfacing

Similar documents
Digital Design W/S Arduino 101 Bluetooth Interfacing

Silicon Valley LAB Intern Report. Hyunjung KIM Youngsong KIM

When is Bluetooth not Bluetooth?

Bluetooth low energy technology Bluegiga Technologies

Grove - 6-Axis Accelerometer&Gyroscope(BMI088)

SMART Technologies. Introducing bluetooth low energy and ibeacon

CISS Communication Protocol Bluetooth LE

A Hacker s Introduction to the Nokia N900

CISS - Connected Industrial Sensor Solution

Click to edit Master title style Buzzing Smart Devices

Sten-SLATE ESP. Accelerometer and I2C Bus

Internet of Things Bill Siever. New Applications. Needs. Wearables. Embedded Smarts. Simple to Setup. Networking w/ Long Battery Life (Low Power)

Bluetooth LE 4.0 and 4.1 (BLE)

Wireless Sensor Networks BLUETOOTH LOW ENERGY. Flavia Martelli

Bluetooth Mesh. Johan Hedberg

Tap BLE API Documentation

BILLING AND CONTROLLING OF INDIVIDUAL LOADS OF A COMPOSITE SYSTEM USING SIMPLE ANDROID APPLICATION

BT121 Bluetooth Smart Ready Module. May 2015

BLE as Active RFID. Tutorial presented by Jeffrey Dungen at IEEE RFID 2017

Introduction to Bluetooth Low Energy

BLUETOOTH 4.1 FREQUENTLY ASKED QUESTIONS

Wi-Fi helping out Bluetooth Smart for an improved home automation user experience

Lab 8. Communications between Arduino and Android via Bluetooth

#include "quaternionfilters.h" #include "MPU9250.h" data read #define SerialDebug true // Set to true to get Serial output for debugging

Performance Evaluation of Bluetooth Low Energy Communication

ENVIRONMENTAL SENSING PROFILE

BLE Command Line Interface Document

Application Note: xpico BLE Application Note Irvine Center Drive Suite 100 Irvine, CA USA

R&D Centre: GT Silicon Pvt Ltd 171, MIG, Awadhpuri, Block B, Lakhanpur, Kanpur (UP), India, PIN

Bluetooth Low Energy (BLE) Based Mobile Electrocardiogram Monitoring System

CONSTRUCTION GUIDE The pendulumrobot. Robobox. Level X

Leveraging IoT Biometrics and Zephyr RTOS for Neonatal Nursing in Uganda

nblue TM BR-MUSB-LE4.0-S2A (CC2540)

EMBEDDED SYSTEMS PROGRAMMING Accessing Hardware

Parts List. XBEE/Wifi Adapter board 4 standoffs ¼ inch screws Cable XBEE module or Wifi module

Introduction to Arduino

BT121 Bluetooth Smart Ready Module. July 2016

Use of ISP1880 Accelero-Magnetometer, Temperature and Barometer Sensor

PSoC Academy: How to Create a PSoC BLE Android App Lesson 3: Configure the BLE Component 1

KST3300 Firmware Specification

IoT Deep DIve #3. Advanced BLE - Custom GAP/GATT

DT0063 Design tip. Bluetooth Low Energy network: time-stamping and sample-rate-conversion. Purpose and benefits. BLE wireless link overview

Energy Efficient Mobile Compu4ng Building low power sensing devices with Bluetooth low energy. Simo Veikkolainen Nokia May 2014

UM2361. Getting started with the ST BlueNRG-Mesh ios application. User manual. Introduction

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C

Bluetooth Smart Development with Blue Gecko Modules. Mikko Savolainen October 2015

CS123 - Communication

KAUSTUBH DEKATE KEDAR AYACHIT KALPESH BHOIR SAGAR KEDARE DHAWAL JADHAV NITIN DHALE

Controlling electrical home appliances, using Bluetooth Smart Technology (October 2015) Pedro José Vieira da Silva

State of the Art Sensing: 132 AD

Getting started with the FP-NET-6LPBLE1 function pack for 6LoWPAN IoT node connection to a smartphone via BLE interface

Terminal I/O Profile Client Implementation Guide

mbed OS Update Sam Grove Technical Lead, mbed OS June 2017 ARM 2017

Intel Edison Workshop

Getting started with STEVAL-IDB007V1 and STEVAL-IDB008V1 evaluation boards

IoTivity Big Picture. MyeongGi Jeong Software R&D Center

This lesson introduces Blender, covering the tools and concepts necessary to set up a minimal scene in virtual 3D space.

Parts List. XBEE/Wifi Adapter board 4 standoffs ¼ inch screws Cable XBEE module or Wifi module

Quick Start Guide. Bluetooth Low Energy expansion board based on SPBTLE-RF module for STM32 Nucleo (X-NUCLEO-IDB05A1) Version 1.

Multi-link support for up to four simultaneous connections in any combination of roles

KW40 ZumoBot Reference Design

ARDUINO BOARD LINE UP

An overview of mobile and embedded platforms

IOTIVITY INTRODUCTION

The BlueNRG-1, BlueNRG-2 BLE OTA (over-the-air) firmware upgrade

Lesson 6 Intel Galileo and Edison Prototype Development Platforms. Chapter-8 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

The Future of Lighting Is Smart. Martin Mueller Roger Sexton

Gravity: BMI160 6-Axis Inertial Motion Sensor SKU: SEN0250

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)...

Use of ISP1507-AL Evaluation Boards

Digital Devices in the Digital Technologies curriculum (F-10) Steve Allen VCAA Digital Coding Specialist Teacher

USER GUIDE. SAML21 Wearable Demo (ATULPC-DEMO) ATSAML21G18B. Preface

Release Notes Zebra VC80x NN-00-A Release for AOSP. Introduction. Introduction. Description. Zebra Value Adds Feature List

Beetle. Sharing, flexibility and access control for Bluetooth Low Energy. Amit Levy James Hong Laurynas Riliskis Philip Levis Keith Winstein

PM0257. BlueNRG-1, BlueNRG-2 BLE stack v2.x programming guidelines. Programming manual. Introduction

Quick Start Guide. Bluetooth Low Energy expansion board based on BlueNRG for STM32 Nucleo (X-NUCLEO-IDB04A1) Version 1.

BLUETOOTH SMART READY SOFTWARE

EEG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

Chapter 2: Android Device Basics

Overview. Applications. Features. Pin assignment

Bluetooth Low Energy CC2540/41 Mini Development Kit User s Guide

Bluegiga Bluetooth Smart Software v.1.3 5/28/2014 1

DFRobot CurieNano A mini Genuino/Arduino 101 Board SKU: DFR0453

KW41Z IEEE and BLE Coexistence Performance

State of the Art Sensing: 132 A.D.

Distributed Multichannel System Nor850

BLUETOOTH HID PROFILE

ArtecRobo Bluetooth Controller User Guide. Published 2015/04/01 Revised 2017/01/16

BLUE bean. Data sheet

Adafruit Feather nrf52840 Express

Bluno SKU:DFR0267. Contents. Introduction

Alternative Designs and Decision Making for Top Design Selection

Getting to know the Arduino IDE

RoboRemo User Manual v1.9.1

Performance of Smartphones while scanning low power Bluetooth Smart Beacons

Bluetooth Based Home Appliance Control System with Feedback Voice Response Using Android Application

User Guide v1.0. v1.0 Oct 1, This guide is only available in English Ce manuel est seulement disponible en Anglais

Bluetooth Low Energy Protocol Stack

Bluetooth Based Home Automation Using Arduino and Android Application

Transcription:

Digital Design W/S Arduino 101 Bluetooth Interfacing Tom Moxon @PatternAgents

Intros PDX Hackerspace Jon and Melinda Please donate to help support the Hackerspace, and ask them if you are interested in membership Digital Design Workshop Tom and Stephen Bringing you professional grade engineering workshops See our calendar for upcoming workshops (Upverter) Hackster.io, Intel, Mikroelectronika, Newark, Element14 Sponsored the materials and swag for the meet-up today

Instructions on Hackster.Io https://www.hackster.io/moxbox/arduino101bluetooth-interfacing-3fc2bc

Arduino101 Platform Joint effort between Arduino & Intel The Ardunio101 has dual Intel processors X86 (Quark) and ARC core (Curie) Translation Libraries provide Arduino compatibility The Arduino101 has some built-in sensors (IMU) 6 Axis Accelerometer & Gyroscope

Mikroelectronika Mikrobus Adapter Belgrade, Yugoslavia

Relay Click Click boards from Mikroelectronika All Mikrobus peripherals Over 250 types available (quick & easy...) Two (2) Mechanical relays to control higher powered lights, motors, etc. Be WARNED unshielded/unprotected not recommended for 120/240 AC etc.

Intro to Arduino & Blynk Quick Check of experience levels here today? Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists and anyone interested in creating interactive objects or environments. Blynk is a popular mobile application for the Internet of Things. It supports a number of platforms like Arduino, ESP8266, RaspPi, and others, and runs on Android and Apple.

Arduino IDE What's Arduino? (Company, Board, IDE, Community?) Arduino abstracts many hardware details, more simple. Uses basic C/C++ Syntax Libraries extend the functionality, user contributed (big!) #include wire.h add library by including it. (it must be installed with Library Manager First...) Boards extend the supported platforms make sure to use version 1.0.7 of Arduino101 boards manager (quick overview of the Arduinio IDE...)

Arduino Drawbacks No Integrated Debugger It's a community project, so agreement on features, etc. Libraries and tools are often not well tested (depends) Limited support of micros and platforms Even so it's widely used now... source: PatternAgents

Blynk Intro Started as a sucessful Kickstarter project, launched a company Makes creating a Graphical User Interface on smartphones as simple as drag-and-drop some widgets. Fast, easy. Bluetooth support is very new, it's a little buggy yet. (not always a Blynk problem, vendor differences, etc.) Wi-Fi support is pretty robust, use it for production work. Need to pay $$$ for extended interfaces, publishing your own applications with your own logo, etc. Add the concept of virtual pins to devices, very nice! Your sketch gets a callback from the Blynk library...

Blynk Example Virtual pins are named V0 thru Vxx and use a simple access method BLYNK_WRITE(V1) { int pindata = param.asint(); digitalwrite(relay1_pin, pindata); } V1 controls Relay1, V2 controls Relay2, V3 controls Relay3, V4 controls Relay4

Blynk Example

Bluetooth Introduction A Wireless Personal Area Network Originally Nokia Wibree (2006) Merged into Bluetooth SIG (2010) Very low power transmitter Ubiquitous now... Source: Wikipedia

Bluetooth vs. WiFi Source: Bluetooth SIG

Bluetooth 4/5/LE Bluetooth is a rapidly expanding set of specifications Bluetooth Low Energy (LE) is a subset of BT 4.0 specification Needs newer platforms (Win8+, ios7+, Android 4.3+, Linux 4.93+) BT 5.0 is adding new features like Mesh networking, Thread, etc. It's new, and not all devices are backward or cross compatible! (make sure you test your use cases thoroughly...) Source: Bluetooth SIG

Bluetooth Device Roles GAP is an acronym for the Generic Access Profile, and it controls connections and advertising in Bluetooth. GAP defines various roles for devices, but the main two are Central devices and Peripheral devices. Peripheral devices are small, low power, resource constrained devices that can connect to a much more powerful central device. Peripheral devices are things like a heart rate monitor, a mouse, a keyboard, etc. Central devices are usually the mobile phone or tablet that you connect to with far more processing power and memory. Source: Bluetooth SIG

Advertising and Scan Response Data There are two ways to send advertising data out with GAP. The Advertising Data payload and the Scan Response payload. Both payloads are identical and can contain up to 31 bytes of data, but only the advertising data payload is mandatory, since this is the payload that will be constantly transmitted out from the device to let central devices in range know that it exists. The scan response payload is an optional secondary payload that central devices can request, and allows device designers to fit a bit more information in the advertising payload such a strings for a device name, etc. Source: Bluetooth SIG

Bluetooth Network Topology Source: Bluetooth SIG

GATT and Profiles GATT is an acronym for the Generic Attribute Profile, and it defines the way that two Bluetooth Low Energy devices transfer data back and forth using concepts called Services and Characteristics. It makes use of a generic data protocol called the Attribute Protocol (ATT), which is used to store Services, Characteristics and related data in a simple lookup table using 16-bit IDs for each entry in the table. GATT comes into play once a dedicated connection is established between two devices, meaning that you have already gone through the advertising process governed by GAP. Source: Bluetooth SIG

GATT Transactions The peripheral is known as the GATT Server, which holds the ATT lookup data and service and characteristic definitions, and the GATT Client (the phone/tablet), which sends requests to this server. All transactions are started by the master device, the GATT Client, which receives response from the slave device, the GATT Server. When establishing a connection, the peripheral will suggest a 'Connection Interval' to the central device, and the central device will try to reconnect every connection interval to see if any new data is available, etc. It's important to keep in mind that this connection interval is really just a suggestion, though! Your central device may not be able to honour the request because it's busy talking to another peripheral or the required system resources just aren't available. Source: Bluetooth SIG

Profiles and Services Profile - a pre-defined collection of Services that has been compiled by either the Bluetooth SIG or by the peripheral designers. The Heart Rate Profile, for example, combines the Heart Rate Service and the Device Information Service. Services are used to break data up into logical entities, and contain specific chunks of data called characteristics. A service can have one or more characteristics, and each service distinguishes itself from other services by means of a unique numeric ID called a UUID, which can be either 16-bit (for officially adopted BLE Services) or 128-bit (for custom services). Source: Bluetooth SIG

Characteristics The lowest level concept in GATT transactions is the Characteristic, which encapsulates a single data point (though it may contain an array of related data, such as X/Y/Z values from a 3-axis accelerometer, etc.). Similarly to Services, each Characteristic distinguishes itself via a predefined 16-bit or 128-bit UUID, and you're free to use the standard characteristics defined by the Bluetooth SIG or to define your own custom characteristics which only your peripheral and SW understands. As an example, the Heart Rate Measurement characteristic is mandatory for the Heart Rate Service, and uses a UUID of 0x2A37. It starts with a single 8-bit value describing the HRM data format (whether the data is UINT8 or UINT16, etc.), and the goes on to include the heart rate measurement data that matches this config byte. Source: Bluetooth SIG

Instructions on Hackster.Io https://www.hackster.io/moxbox/arduino101bluetooth-interfacing-3fc2bc

Gyro and Accelerometer

CurrieIMU Library begin() GetGyroRate() GetAccelerometerRate() getaccelerometerrate() setaccelerometerrate() getgyrorange() setgyrorange() getaccelerometerrange() setaccelerometerrange() autocalibrategyrooffset() autocalibrateaccelerometeroffset() nogyrooffset() noaccelerometeroffset() gyrooffsetenabled() (much more...)

CurrieIMU Setup #include "CurieIMU.h" void setup() { Serial.begin(115200); // initialize Serial communication while (!Serial); // wait for the serial port to open // initialize device Serial.println("Initializing IMU device..."); CurieIMU.begin(); // Set the accelerometer range to 250 degrees/second CurieIMU.setGyroRange(250); // Set the accelerometer range to 2G CurieIMU.setAccelerometerRange(2); }

CurrieIMU Gyro void loop() { float gx, gy, gz; //scaled Gyro values // read gyro measurements from device, scaled to the configured range CurieIMU.readGyroScaled(gx, gy, gz); // display tab-separated gyro x/y/z values Serial.print("g:\t"); Serial.print(gx); Serial.print("\t"); Serial.print(gy); Serial.print("\t"); Serial.print(gz); Serial.println(); }

CurrieIMU Accelerometer void loop() { float ax, ay, az; //scaled accelerometer values // read accelerometer measurements from device, scaled to the configured range CurieIMU.readAccelerometerScaled(ax, ay, az); // display tab-separated accelerometer x/y/z values Serial.print("a:\t"); Serial.print(ax); Serial.print("\t"); Serial.print(ay); Serial.print("\t"); Serial.print(az); Serial.println(); }

Hackster.io Platform source: PatternAgents

Hackster.io Projects source: PatternAgents

If you would like to help... Sign Up for Hackster.IO Please go to : https://www.hackster.io/thingsoc and Click on the blue Following button We'll be having some thingsoc workshops in June!

Thank You! Thank You! Source : @PatternAgents