Code Monkey home page Code Monkey logo

rpi-linx-addons's Introduction

RPi-LINX-Addons

A collection of libraries for talking to hardware using the Raspberry Pi with the LabVIEW LINX toolkit.

Supported Hardware

Hats

  • Automation Hat: A driver class is provided for the Pimoroni Automation Hat - this hat includes 3 0-24V ADC channels, 3 relay outputs, 3 24V tolerant sinking outputs, 3 24V buffered inputs and a number of status/indicator LEDs. The driver provides (optional) automatic control of the status LEDs (e.g. relay output state). [Buy - Amazon UK] [Information]
  • Sense Hat: A driver class for the Raspberry Pi Sense Hat - this hat includes temperature, humidity, pressure, gyroscope, acceleromter, magnetometer sensors along with an 8x8 RGB LED matrix and joystick. [Buy - Amazon UK] [Information]
  • WaveShare High-Precision AD/DA Board: Drivers are provided for the ADS1256 8-channel 24-bit ADC and the DAC8552 2-channel 16-bit DAC used on the WaveShare ADC/DAC board. Useful for adding analogue sensing & control to your Raspberry Pi. [Buy - Amazon UK] [Information]
  • Explorer Hat Pro: The Explorer Hat Pro adds a useful collection of I/O to the Raspberry Pi including an ADS1015 4-channel ADC, a CAP1208 8-channel capacitive touch sensor, 5V buffered inputs/outputs, 4 LEDs, a H-bridge motor driver and a mini-breadboard for adding your own circuits and sensors. [Buy - Amazon UK] [Information]

Chip Drivers

  • PCA9685 16-Channel PWM driver (I2C): 16-Channel PWM driver with customisable frequency/duty cycle output. Includes functions for driving servos. [Buy - Amazon UK] [Information]
  • SN3218 18-Channel LED driver (I2C): 18-Channel LED driver chip with brightness control (0-255 steps). This chip is used on the Automation Hat to drive the LEDs (see above). [Datasheet]
  • ADS1X15 2/4-Channel ADC (I2C): Support for the TI ADS1015 and ADS1115 ADC chips. These provide 4 single-ended or 2 differential ADC channels and either a 12/16-bit resolution and up to a 3300Hz sampling rate depending on the chip variant. The library provides basic support for reading the channels in single-shot (low-power) mode. [Buy ADS1115 - Amazon UK] [Buy ADS1015 - Amazon UK] [Information]
  • HTS221 Temperature/Humidity Sensor (I2C): Temperature/Humidity Sensor used on the Raspberry Pi Sense Hat [Information]
  • LPS Pressure/Temperature Sensor (I2C): Pressure/Temperature/Altimeter Sensor used on the Raspberry Pi Sense Hat. Supports the LPS25H/LPS25HB devices. [Information]
  • LSM9DS1 9DOF IMU (I2C): Accelerometer, Gyroscope and Magnetometer offering 9DOF IMU sensing support. Used on the Sense Hat. [Buy - Amazon UK] [Information]
  • ADS1256 8-Ch 24-bit ADC (SPI): [Datasheet]
  • DAC8552 2-Ch 16-bit DAC (SPI): [Datasheet]
  • CAP1208 8-Ch Capacitive Touch Sensor (I2C): [Datasheet]

Helper Libraries

The package also includes wrappers for the low-level LINX functionality for the following interfaces:

  • I2C: Read/Write/Read Byte/Read Register/Write Register
  • GPIO: Read/Write GPIO
  • SPI: A wrapper library for the LINX SPI functions

Examples

The library includes a basic example of each chip/hat type.

Contributions

We're always looking to add/improve support for new devices - if you wish to contribute to this repository then please fork, make your changes and then submit a pull request.

Support

This library is intended to be a community effort and as such therefore support is provided through the GitHub issue tracker. If you run into a problem when using the library then please add it to the Issues page and submit it there.

Need something in particular?

If you want to use a particular chip/device and the library doesn't have support for it - feel free to request a new device by submitting an issue to the issue tracker on GitHub. If we can get access to the hardware to test and there's sufficient interest we will try to add support for it.

rpi-linx-addons's People

Contributors

samsharp99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rpi-linx-addons's Issues

Sense Hat: Test Joystick / 8x8 RGB LED Support

The support for the Joystick and LED Matrix is untested as I get a LabVIEW Error Code 500 when trying to communicate with the ATTINY88 I2C device used to drive them.

I'm pretty sure it's a hardware issue but I will try to verify with the original Python Sense Hat driver and maybe try reflashing the ATTINY88 over SPI if it's relatively straightforward.

It does show the initial power-up rainbow so the LED matrix itself is fine.

SenseHAT LED-matrix colour depth is only 6 bit

The LED2472G chip driving the 8x8-LED-matrix supports only 6-bit colour depth, sending values >63 on any colour channel results in no effect or unexpected behaviour.
Right-shifting the colour values by 2 bits before sending them to the senseHAT solves this problem.
I made a workaround and a suggestion for a fix in "Set LEDs.vi", see attached pictures.
senseHAT Set LEDs fix
senseHAT LED matrix workaround

What is the PIN of ADS1256?

  1. What is the PIN of ADS1256 for Raspberry Pi?
  2. Do I still need to install other ADS1256 libraries on Raspberry Pi?
  3. I try to connect but the value read is still 0
  4. Can you provide steps?
    image

ADS1X15: Incorrect ADC Scaling

ADC scaling in the ADS1X15 driver seems to be off - there seems to be quite an offset and the scaling is incorrect. Waveforms are the correct shape but the amplitude/offset seems wrong - this is with both ADS1015 and ADS1115 devices.

Waveshare 2-Ch RS232 HAT

https://www.waveshare.com/product/raspberry-pi/hats/interface-power/2-ch-rs232-hat.htm
https://www.waveshare.com/wiki/2-CH_RS232_HAT

This HAT is fairly easy to get operating on the RPi using the Waveshare example code; however, integrating it with LabVIEW and the LINX toolkit is proving to be a bit more difficult. The HAT utilizes the SC16IS752 UART expansion chip (datasheet attached) along with the SP3232 RS232 transceiver and is controlled via the SPI interface.

SC16IS752_datasheet.pdf

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.