GithubHelp home page GithubHelp logo

activation-sequencer's Introduction

Important

The only code written by myself can be found in the src/main.c file.
All other files were either created on compilation or externally provided to use features of the KL25Z board such as its LEDs or accelerometer.

More details explaining the program's strcture can be found directly in the comments.

Information

The project uses a serial data link (over USB) to a terminal emulator running on the connected PC / laptop.

  • The accelerometer is polled every 2 seconds
  • The X, Y and Z acceleration values are converted to proportions of g
  • These values are used to determine in which orientation the board is.
  • Event flags are used in order to signal a change in orientation or a new Flat, Right or Up orientation.
  • An activation sequence requires the board to be held in certain orientations for different amounts of time to trigger the system.
  • If the sequence is not completed correctly, the system will enter an error state and the error type will be printed to the terminal.

The project uses two threads:

  • One determines when a change in orientation occurs.
  • The other one manages the activation sequence of orientations.

The project includes the code for the serial interface. Only one of the API's function is used :
sendMsg which write a message to the terminal

The project includes code for the accelerometer. This API has two functions:
initAccel initialises the accelerometer
readXYZ reads the three accelerations

activation-sequencer's People

Contributors

gusdrd 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.