GithubHelp home page GithubHelp logo

jiyuhan / iphone-position-tracker Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 28.92 MB

This project can turn your phone into a gyro controller! I don't have the code for the iPhone side application, and I don't own the code for the microcontroller.

JavaScript 99.67% HTML 0.21% CSS 0.12%
nodejs html css ble

iphone-position-tracker's Introduction

phoneController - part I

This is the project that I will be presenting on August 30th for club fair. A testing video can be seen here.

abstract

This project is simply using ATmega32u4 and a bluetooth LE (BLE) moduleto receive information from iPhone's gyroscope for the quaternion. Then, using serial connection to feed Node.js to create a server that updates iPhone's position. A client side app will use the data to control a webGL cube.

how does it work?

This project goes around like this:

iPhone (quaternion data)

⬇️ Bluetooth Low Energy (BLE)

Adafruit 32u4 Feather

⬇️ Serial Comm. (baud rate: 115200)

Node.js server

⬇️ parsed nicely and upload to http://localhost:8000/ (127.0.0.1:8000)

intranet

⬇️ taken by client side, and taken by 3D model

client virtual phone moves.

how to use it

First step is to start the server side. Run

ls /dev/tty.*

to determine which serial port you are using for Adafruit 32u3 Feather. Then change accordingly in serialToNode.js.

Then install dependencies. Type

npm install serialport

If it fails, try this

sudo npm install serialport --unsafe-perm --build-from-source

If still doesn't work, reading this might help.

Next step, install ws (websocket).

npm install ws

this usually should work fine.

After all this, open a terminal and run

nodejs serialToNode.js

Or if your laptop runs MacOS or maybe older version of node.js, try

node serialToNode.js

Next, we are to open the client side. Open the file index.html should do the job. It might not be able to support all the browsers, but FireFox should work.

web design

I previously had a temeprary website I designed, but now I have a better one there.

@ Thomas Han

iphone-position-tracker's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.