Giter Club home page Giter Club logo

pkgloves's Introduction

pkgloves

Arduino version of Stanford Parkinson's gloves developed by Peter Tass

This code is an Arduino program that randomly flashes motors connected to digital pins 2 to 9.

First, constants are defined for each of the digital pins to which the motors are connected.

There is a function called "estaenvector" that takes a value and a vector as arguments and returns true if the value is found in the vector and false otherwise.

This function is used later to ensure that the random values assigned to the motors are unique.

There is also a function called "aleatorio" that takes a pointer to a vector and the size of the vector as arguments.

This function assigns random values to each element of the vector, ensuring that the values are unique.

In the "setup" block, all pins are configured as outputs and all motors are turned off at the start.

In the "loop" block, the "aleatorio" function is called to generate a vector of four random values, then the vector is traversed and the motors corresponding to each value of the vector are turned on.

Then, a delay of 100 milliseconds is waited before moving on to the next element of the vector.

Finally, a delay of 133 milliseconds is waited twice before starting the loop again.

pkgloves's People

Contributors

alejandrosenes avatar

Stargazers

 avatar

Watchers

 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.