Peter Ma
Published © Apache-2.0

2D Catch Game Using 3D Magnetic Sensor

A 2D catch game using the Infineon 3D magnetic sensor.

BeginnerFull instructions provided4 hours1,203

Things used in this project

Hardware components

3D Magnetic Sensor 2Go
Infineon 3D Magnetic Sensor 2Go
×1

Software apps and online services

Unity
Unity
Arduino IDE
Arduino IDE

Story

Read more

Schematics

3D Go

The 3D Go

Code

Arduino Code

Arduino
Arduino code for the 3D Magnetic Sensor
#include <Tle493d_w2b6.h>

Tle493d_w2b6 Tle493dMagnetic3DSensor = Tle493d_w2b6();

void setup() {
  Serial.begin(9600);
  while (!Serial);
  pinMode(14, OUTPUT);

  Tle493dMagnetic3DSensor.begin();
  Tle493dMagnetic3DSensor.begin();
  Tle493dMagnetic3DSensor.setWakeUpThreshold(1,-1,1,-1,1,-1);
  Tle493dMagnetic3DSensor.disableTemp();
}


void loop() {
  Tle493dMagnetic3DSensor.updateData();
  Serial.println(Tle493dMagnetic3DSensor.getAzimuth());
  delay(10);
}

Game Repo

Game repo using Unity

Credits

Peter Ma

Peter Ma

49 projects • 393 followers
Prototype Hacker, Hackathon Goer, World Traveler, Ecological balancer, integrationist, technologist, futurist.
Thanks to Unity Tutorial.

Comments