Code Monkey home page Code Monkey logo

sensei's Introduction

Sensei

Make your Smartphone a Remote Controller

What is it ?

A pointer/laser like remote using nothing but a Smartphone and built-in sensors like Accelerometer & Gyroscope.

Demo :

https://sensei-mns3.onrender.com/ - Note : Due to Server Location, this might have some latency issues. Demo

As you can see, I can point my Phone towards the screen and the Red Dot moves there as if the phone was a laser pointer. This is done with nothing but Sensors like Accelerometer, Gyroscope on the Device.

How does this work ?

The Client utilizes the Generic Sensor API to access sensor data and then translates it into a position of pointer on your laptop/desktop screen. The data is transmitted in realtime using WebSockets through Socket-io and is drawn on the canvas.

Prerequisites

As of writing this, the Generic Sensor API is only supported in Google Chrome v71+ and only on Android Devices. So the Client must be running on supported browser and device.

Development

The Server consists of an Express-backed Node Server, customized to optionally serve using https that is required for the Generic Sensor API. (Configure Env Variable & generate Self Signed Certificate.)

Make sure to have a .env file configured with PORT (number) and HTTPS (Boolean).

Install Dependencies :

yarn
# OR
npm install

Development Server - with Hot Reload:

yarn dev
# OR
npm run dev

Production Server:

yarn start
# OR
npm run start

License

MIT

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.