Merge branch 'release/v2.9.0'

This commit is contained in:
Ivan Kravets
2016-04-28 18:48:01 +03:00
266 changed files with 7713 additions and 1056 deletions

View File

@@ -1 +1,3 @@
.pioenvs
.pioenvs
.clang_complete
.gcc-flags.json

View File

@@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com>
.. Copyright 2014-present Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@ -13,16 +13,16 @@ How to build PlatformIO based project
=====================================
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
2. Download `source code with examples <https://github.com/platformio/platformio/archive/develop.zip>`_
2. Download `source code with examples <https://github.com/platformio/platformio-examples/archive/develop.zip>`_
3. Extract ZIP archive
4. Run these commands:
.. code-block:: bash
# Change directory to example
> cd platformio-develop/examples/atmelavr-and-arduino/engduino-magnetometer
> cd platformio-examples/atmelavr-and-arduino/engduino-magnetometer
# Process example project
# Build project
> platformio run
# Upload firmware

View File

@@ -1,3 +1,4 @@
#include <Arduino.h>
#include <EngduinoMagnetometer.h>
#include <Wire.h>
@@ -7,12 +8,12 @@
//
void setup()
{
{
EngduinoMagnetometer.begin();
}
void loop()
{
{
float magneticField[3];
// Read magnetic field strength. The values range from -20000
@@ -20,7 +21,7 @@ void loop()
// values
//
EngduinoMagnetometer.xyz(magneticField);
float x = magneticField[0];
float y = magneticField[1];
float z = magneticField[2];
@@ -31,7 +32,7 @@ void loop()
Serial.print(" counts z = ");
Serial.print(z);
Serial.println(" counts");
// Note that this is an uncalibrated temperature
// of the die itself. Whilst it should be a value
// in degrees C, the lack of calibration could mean
@@ -39,6 +40,6 @@ void loop()
int8_t t = EngduinoMagnetometer.temperature();
Serial.print("Temperature: ");
Serial.println(t);
delay(1000);
}