Git Product home page Git Product logo

marvelmind.py's Introduction

marvelmind.py

marvelmind.py includes small python class based on threading.Thread for receiving and parsing coordinates data from Marvelmind mobile beacon by USB/serial port. example.py is an example of use. Written by Alexander Rudykh ([email protected])

Download

Attributes:

adr - address of mobile beacon (from Dashboard) for data filtering. If it is None, every read data will be appended to buffer.

Default value: None

tty - serial port device name (physical or USB/virtual). It should be provided as an argument:

  • /dev/ttyACM0 - typical for Linux

  • /dev/tty.usbmodem1451 - typical for Mac OS X

baud - baudrate. Should be match to baudrate of hedgehog-beacon

Default value: 9600

maxvaluescount - maximum count of measurements of coordinates stored in buffer

Default value: 3

valuesUltrasoundPosition - buffer of US measured data (address of device, x, y, z (meters), angle (1/10 degree), timestamp (seconds)): [adr, x, y, z, ang, timestamp]

valuesImuRawData - buffer of IMU raw measures (accelerometer, gyroscope, compass)

valuesImuData - buffer of IMU and US based measures (position, angular position (quaternion), velocities, accelerations): [x, y, z, qw, qx, qy, qz, vx, vy, vz, ax, ay, az, timestamp]

debug - debug flag which activate console output

Default value: False

pause - pause flag. If True, class would not read serial data

terminationRequired - If True, thread would exit from main loop stop

Methods:

position(self)

Return last measured data in array [x, y, z, timestamp]

run(self)

Main loop

stop(self)

Request to stop main loop and close serial port

print_position(self)

Print last measured data in default format

Required libraries:

To prevent errors when installing crcmod module used in this script, use the following sequence of commands:

sudo apt-get install python-pip
sudo apt-get update
sudo apt-get install python-dev
sudo pip install crcmod

marvelmind.py's People

Contributors

asquad avatar smoker771 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.