Giter VIP home page Giter VIP logo

mlx90640-library's Introduction

mlx90640-library

Fork of pimoroni's mlx940640 software, for use in the TurtleBot4

Raspberry Pi Users

** EXPERIMENTAL **

This port uses either generic Linux I2C or the bcm2835 library. Upon building, the mode is set with the I2C_MODE property, i.e. make I2C_MODE=LINUX or make I2C_MODE=RPI. The default is LINUX, without the need for the bcm2835 library or root access.

Generic Linux I2C Mode

Make sure the Linux I2C dev library is installed:

sudo apt-get install libi2c-dev

To get the best out of your sensor you should modify /boot/firmware/usercfg.txt and change your I2C baudrate to 400 kHz:

dtparam=i2c1=on,i2c1_baudrate=400000

Now build the MLX90640 library and examples in LINUX I2C mode:

make clean
make I2C_MODE=LINUX

Dependencies

On the TurtleBot4's, a few additional dependencies are needed:

gstreamer plugins for the rawrgb and network streaming example:

sudo apt-get install libgstreamer1.0-0 gstreamer1.0-dev gstreamer1.0-tools gstreamer1.0-doc
sudo apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-good

Building

After installing the dependencies, you can build the library. Build-modes are:

  • make or make all: build the library and all dependencies. Default is to use standard linux I2C-Drivers, specify Raspberry Pi driver with make I2C_MODE=RPI
  • make examples: only build examples, see below
  • sudo make install: install libraries and headers into $PREFIX, default is /usr/local

Afterwards you can run the examples or build the python binding, see readme in the subfolder. If you built the examples or library using the native bcm2835 I2C-Driver, you need to run all applications and examples as root. Hence, sudo examples/<exampleame> for one of the examples listed below, or without sudo when using the standard Linux driver.

Examples

rawrgb gstreamer

make examples/rawrgb
sudo ./rawrgb | gst-launch-1.0 fdsrc blocksize=2304 ! udpsink host=enter-host-ip port=5000

On the recieving end, run:

gst-launch-1.0 udpsrc blocksize=2304 port=5000 ! rawvideoparse use-sink-caps=false width=32 height=24 format=rgb framerate=16/1 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480 ! autovideosink

fbuf

make examples/fbuf
sudo examples/fbuf

This example uses direct-to-framebuffer rendering and black-blue-green-yellow-red-purple-white false colouring.

If you have issues with the output image, set "IMAGE_SCALE" to a smaller number.

interp

make examples/interp
sudo examples/interp

This example uses direct-to-framebuffer rendering and black-blue-green-yellow-red-purple-white false colouring.

It also has 2x bicubic resize filter.

If you have issues with the output image, set "IMAGE_SCALE" to a smaller number.

test

make examples/test
sudo examples/test

This example draws out to the console using ANSI colours and the full block char.

To see the actual temperature values, change "FMT_STRING" from the block char to the float format.

step

make examples/step
sudo examples/step

Attempt to run in step by step mode (experimental)

mlx90640-library's People

Contributors

gadgetoid avatar slavysis avatar 21347 avatar nickshaju avatar acme avatar mame82 avatar sandyjmacdonald avatar vianpatel avatar agalera avatar bakkerd avatar pjaos avatar robmarkcole avatar futureshape 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.