Giter Site home page Giter Site logo

glovearduinocode's Introduction

Glove Listener

Listens for incoming serial bytes that indicate which motor(s) should vibrate to provide haptic feedback to the user.

Packet Structure

Each packet is made up of 5 bytes, each of which is an 8 bit unsigned integer.

The format is as follows: [0xFF][motor][intensity][duration][checksum]

[0xFF] - Preamble byte, 255 in integer form, used to tell when a new packet is starting

[motor] - The motor to be toggled on, ranging from motor 0 to 3 (5 will turn on all motors)

[intensity] - The intensity of the motor that is being toggled on, ranging from 0 - 100%

[duration] - The duration to keep the motor on for, ranging from 0 - 100% of a second (10% is 100ms, 100% is 1sec)

[checksum] - Used to make sure the data was received properly. Never 255. The sender will truncate to 254 rather than send a 255.

If a new packet is received, it will overwrite the duration of the previous one, terminating it immediately.

glovearduinocode's People

Contributors

prattcmp avatar

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.