Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz Hoechner committed May 8, 2018
0 parents commit 8b3712d
Show file tree
Hide file tree
Showing 16 changed files with 1,160 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# =============================================================================
# List those files that shall be ignored by Git commits.
# =============================================================================

# -----------------------------------------------------------------------------
# IDE config files and directories
# -----------------------------------------------------------------------------


# -----------------------------------------------------------------------------
# OS generated files
# -----------------------------------------------------------------------------
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
desktop.ini

# -----------------------------------------------------------------------------
# Backup files
# -----------------------------------------------------------------------------
*~
*#
*.bak
*.orig
\#*\#

# -----------------------------------------------------------------------------
# Generated files and directories
# -----------------------------------------------------------------------------
build/
doxygen.warning
doxyfile

# -----------------------------------------------------------------------------
# VIM Files
# -----------------------------------------------------------------------------
*.sw[abcdefghijklmnop]

# -----------------------------------------------------------------------------
# Dumps from crashed programs
# -----------------------------------------------------------------------------

# -----------------------------------------------------------------------------
# Log Files
# -----------------------------------------------------------------------------
*.log

# -----------------------------------------------------------------------------
# Menuconfigs
# -----------------------------------------------------------------------------
.config
.config.old
.config.tmp
..config*
.kconfig.d
.tmpconfig*
36 changes: 36 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 3D-Magnetic-Sensor-2GO
<img src="https://github.com/Infineon/Assets/blob/master/Pictures/3D%20Magnetic%20Sensor%202Go.jpg">

Library of Infineon's 3D magnetic sensor TLE493D-W2B6 for Arduino.

## Summary
The 3D Magnetic Sensor 2GO is a budget-priced evaluation board equipped with the magnetic sensor [TLE493D-W2B6](https://www.infineon.com/cms/en/product/sensor/magnetic-position-sensor/3d-magnetic-sensor/tle493d-w2b6-a0/) for three dimensional measurement combined with an ARM® Cortex™-M0 CPU. The 3D Magnetic Sensor 2GO has a complete set of on-board devices, including an on-board debugger. Build your own application and gadget with the 3D Magnetic Sensor 2GO.

## Key Features and Benefits
* TLE493D-A2B6 (three dimensional magnetic sensor)
* XMC1100 (ARM® Cortex™-M0 based)
* On-board J-Link Lite Debugger (Realized with XMC4200 Microcontroller)
* Power over USB (Micro USB), ESD and reverse current protection

## Installation
### Integration of XMC in Arduino IDE
Please note that base of the Sensors 2GO is the XMC 2Go from Infineon. Therefore, please install (if not already done) also the [XMC-for-Arduino](https://github.com/Infineon/XMC-for-Arduino) implementation and choose afterwards **XMC2Go** from the **Tools**>**Board** menu in the Arduino IDE if working with this evaluation board.

### Integration of Library
Please download this repository from GitHub by clicking on the following field in the [releases](https://github.com/Infineon/TLE493D-W2B6-3DMagnetic-Sensor/releases) of this repository or directly [here](//TODO):

![Download Library](https://raw.githubusercontent.com/infineon/assets/master/Pictures/DL_3DMag_Rel.png)

To install the 3D magnetic sensor 2GO library in the Arduino IDE, please go now to **Sketch** > **Include Library** > **Add .ZIP Library...** in the Arduino IDE and navigate to the downloaded .ZIP file of this repository. The library will be installed in your Arduino sketch folder in libraries and you can select as well as include this one to your project under **Sketch** > **Include Library** > **MagneticSensor3D**.

![Install Library](https://raw.githubusercontent.com/infineon/assets/master/Pictures/Library_Install_ZIP.png)

## Usage
Please follow the example sketches in the /examples directory in this library to learn more about the usage of the library.

## Processing
This library supports the open-source software [Processing](https://processing.org/) for creating GUIs. It allows you to connect your evaluation board to a PC over serial communication and visualisation of the embedded system. Find out more on the Arduino homepage [here](http://playground.arduino.cc/Interfacing/Processing). The respective files are stored in the /processing folder of this repository.

## Board Information, Datasheet and Additional Information
A PDF summarizing the features and layout of the 3D magnetic sensor 2GO board is stored on the Infineon homepage [here](https://www.infineon.com/dgdl/Infineon-3D%20Magnetic%20Sensor-PB-v03_00-EN.pdf?fileId=5546d46261d5e6820161e7571b2b3dd0).
The datasheet for the TLV493D-A1B6 can be found here [TLV493D-A1B6 Datasheet](https://www.infineon.com/dgdl/Infineon-Infineon-TLE493D-W2B6%20A0-A3%203D%20Magnetic%20Sensor-DS-v01_00-EN.pdf?fileId=5546d46261764359016189ec158943a4) while respective application notes are located here [Application Notes](https://www.infineon.com/cms/en/product/sensor/magnetic-position-sensor/3d-magnetic-sensor/tle493d-w2b6-a0/#!documents).
Binary file added doc/TLE493D-W2B6.pdf
Binary file not shown.
22 changes: 22 additions & 0 deletions examples/Cartesian/Cartesian.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <Tle493d.h>

Tle493d_w2b6 Tle493dMagnetic3DSensor = Tle493d_w2b6();
void setup() {
Serial.begin(9600);
while (!Serial);
Tle493dMagnetic3DSensor.begin();
Tle493dMagnetic3DSensor.enableTemp();
}

void loop() {
Tle493dMagnetic3DSensor.updateData();

Serial.print(Tle493dMagnetic3DSensor.getX());
Serial.print(" ; ");
Serial.print(Tle493dMagnetic3DSensor.getY());
Serial.print(" ; ");
Serial.println(Tle493dMagnetic3DSensor.getZ());

delay(500);
}

29 changes: 29 additions & 0 deletions examples/Cartesian_low_power/Cartesian_low_poewr.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <Tle493d.h>

/**
* This example demonstrates the use of low poewr mode
*/

Tle493d_w2b6 Tle493dMagnetic3DSensor = Tle493d_w2b6(Tle493d_w2b6::LOWPOWERMODE);
void setup() {
Serial.begin(9600);
while (!Serial);
Tle493dMagnetic3DSensor.begin();
//The highest adjustable range is used for all three directions, i.e., within half of the total value range INT is disabled
Tle493dMagnetic3DSensor.setWakeUpThreshold(1,-1,1,-1,1,-1);

//The update rate is set to 3 (fastest is 0 and slowest is 7)
Tle493dMagnetic3DSensor.setUpdateRate(3);
}

void loop() {
Tle493dMagnetic3DSensor.updateData();

Serial.print(Tle493dMagnetic3DSensor.getX());
Serial.print(" ; ");
Serial.print(Tle493dMagnetic3DSensor.getY());
Serial.print(" ; ");
Serial.println(Tle493dMagnetic3DSensor.getZ());

delay(10);
}
47 changes: 47 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#######################################
# Syntax Coloring Map For Tlv493d
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################

#######################################
# Methods and Functions (KEYWORD2)
#######################################

begin KEYWORD2
end KEYWORD2

setAccessMode KEYWORD2
enableInterrupt KEYWORD2
disableInterrupt KEYWORD2
enableTemp KEYWORD2
disableTemp KEYWORD2

getMeasurementDelay KEYWORD2
updateData KEYWORD2

getX KEYWORD2
getY KEYWORD2
getZ KEYWORD2
getAmount KEYWORD2
getAzimuth KEYWORD2
getPolar KEYWORD2
getTemp KEYWORD2

#######################################
# Instances (KEYWORD2)
#######################################

Tle493d KEYWORD2

#######################################
# Constants (LITERAL1)
#######################################

POWERDOWNMODE LITERAL1
FASTMODE LITERAL1
LOWPOWERMODE LITERAL1
MASTERCONTROLLEDMODE LITERAL1

18 changes: 18 additions & 0 deletions library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "TLE493D-Magnetic-Sensor",
"keywords": "3D, magnetic, sensor2go",
"description": "This library provides an Interface for Infineon's TLE493D-W2B6",
"authors":
{
"name": "Infineon",
"url": "https://www.infineon.com/cms/en/product/sensor/magnetic-position-sensor/3d-magnetic-sensor/tle493d-w2b6-a0/"
},
"repository":
{
"type": "git",
"url": "https://github.com/Infineon"
},
"version": "1.0",
"frameworks": "arduino",
"platforms": "infineonxmc"
}
10 changes: 10 additions & 0 deletions library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name=TLE493D_W2B6
version=1.0.0
author=Infineon Technologies
maintainer=Infineon Technologies <www.infineon.com>
sentence=This library provides an Interface for Infineon's TLE493D-W2B6
paragraph=With this Sensor, you can detect the position of a Joystick etc. without any additional mechanical components. You just have to provide a magnet that is fixed to a movable component.
category=Sensors
url=https://www.infineon.com/cms/en/product/sensor/magnetic-position-sensor/3d-magnetic-sensor/tle493d-w2b6-a0/
architectures=*
Loading

0 comments on commit 8b3712d

Please sign in to comment.