Rishabh Banga
Published © MIT

Getting Started with tinyTILE

In this tutorial, we'll learn how to set up Intel's tinyTILE and test the capabilities of Curie's BMI160 IMU.

BeginnerProtip30 minutes3,693
Getting Started with tinyTILE

Things used in this project

Hardware components

Intel tinyTILE
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

tinyTILE CurieIMU Accelerometer

Arduino
This sketch example demonstrates how the BMI160 on the Intel(R) Curie(TM) module can be used to read Accelerometer data
/*
 * Copyright (c) 2016 Intel Corporation.  All rights reserved.
 * See the bottom of this file for the license terms.
 */

#include "CurieIMU.h"

void setup() {
  Serial.begin(9600); // 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 2G
  CurieIMU.setAccelerometerRange(2);
}

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();
}

/*
   Copyright (c) 2016 Intel Corporation.  All rights reserved.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

*/

tinyTILE-Step-Counter

A short and sweet version of the StepCount example found under Arduino/Genuino 101's example for CurieIMU, created for presentation purposes of displaying BMI160 accelerometer capabilities present in tinyTILE.

Credits

Rishabh Banga

Rishabh Banga

12 projects • 135 followers
Intel Software Innovator | Microsoft Certified Professional | IoT Evangelist

Comments