Coder Social home page Coder Social logo

ngimu-teensy-io-expansion-example's Introduction

NGIMU-Teensy-IO-Expansion-Example

This is an example project demonstrating how a Teensy can be used with the NGIMU auxiliary serial in OSC passthrough mode to send/receive custom OSC messages to provide access to the Teensy I/O and peripherals through the NGIMU. OSC messages generated by the Teensy are forwarded by the NGIMU to the host alongside it's own OSC messages; and OSC messages sent by the host to the NGIMU that are not recognised are forwarded to the Teensy. The example setup uses a Teensy 3.2, an analogue joystick, 3 push buttons, and an RGB LED.

This example is intended to serve as a template for user projects. In most cases, only the Receive.cpp and Send.cpp files need to be modified. The auxiliary serial baud rate can be increased in the NGIMU settings and setup() function in the NGIMU-Teensy-IO-Expansion-Example.ino to achieve higher throughput and lower latency.

OSC messages sent by the Teensy

  • /teensy/joystick/xy - Contains the analogue joystick x and y values (float32). Sent continuously at 10 Hz.
  • /teensy/counter - Contains a counter value (int32) that increments each time the message is sent. Sent continuously at 1 Hz.
  • /teensy/button/a - Contains pin state (boolean). Sent each time button A is pressed or released.
  • /teensy/button/b - Contains pin state (boolean). Sent each time button B is pressed or released.
  • /teensy/button/b - Contains pin state (boolean). Sent each time button C is pressed or released.
  • /error - Contains an error message string argument. Sent if invalid an OSC packet is received by the Teensy.

OSC messages received by the Teensy

  • /teensy/led - Contains one value to turn the Teensy on-board LED on/off.
  • /teensy/rgb - Contains three values to set the red, green, blue brightness of the RGB LED (0 to 257 = brightest to off)

Teensy board connections

  • 3V3 - NGIMU auxiliary serial interface 3.3 V output
  • GND - NGIMU auxiliary serial interface ground
  • RX1 - NGIMU auxiliary serial interface TX
  • TX1 - NGIMU auxiliary serial interface RX
  • 10 - Button A
  • 11 - Button B
  • 12 - Button C
  • A0 - Joystick HORZ
  • A1 - Joystick VERT
  • 21 - RGB LED red cathode
  • 22 - RGB LED geeen cathode
  • 23 - RGB LED blue cathode

ngimu-teensy-io-expansion-example's People

Contributors

xiotechnologies avatar

Stargazers

 avatar Darcy Neal avatar  avatar

Watchers

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